From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2669DC001DF for ; Fri, 20 Oct 2023 20:49:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231218AbjJTUtY (ORCPT ); Fri, 20 Oct 2023 16:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbjJTUtW (ORCPT ); Fri, 20 Oct 2023 16:49:22 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2372B3 for ; Fri, 20 Oct 2023 13:49:20 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19220C433CA; Fri, 20 Oct 2023 20:49:20 +0000 (UTC) Date: Fri, 20 Oct 2023 16:49:17 -0400 From: Steven Rostedt To: Jonathan Corbet Cc: LKML Subject: Re: [PATCH] seq_buf: fix a misleading comment Message-ID: <20231020164917.6fb6f89b@gandalf.local.home> In-Reply-To: <87pm19kp0m.fsf@meer.lwn.net> References: <87pm19kp0m.fsf@meer.lwn.net> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 20 Oct 2023 14:38:49 -0600 Jonathan Corbet wrote: > The comment for seq_buf_has_overflowed() says that an overflow condition is > marked by len == size, but that's not what the code is testing. Make the > comment match reality. > I guess we can add: Fixes: 8cd709ae7658a ("tracing: Have seq_buf use full buffer") Thanks! -- Steve > Signed-off-by: Jonathan Corbet > --- > include/linux/seq_buf.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/seq_buf.h b/include/linux/seq_buf.h > index 515d7fcb9634..026302765494 100644 > --- a/include/linux/seq_buf.h > +++ b/include/linux/seq_buf.h > @@ -39,7 +39,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int size) > > /* > * seq_buf have a buffer that might overflow. When this happens > - * the len and size are set to be equal. > + * len is set to be greater than size. > */ > static inline bool > seq_buf_has_overflowed(struct seq_buf *s)