From nobody Thu Dec 18 11:31:25 2025 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 22DABC001DF for ; Fri, 20 Oct 2023 22:27:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbjJTW15 (ORCPT ); Fri, 20 Oct 2023 18:27:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230117AbjJTW1o (ORCPT ); Fri, 20 Oct 2023 18:27:44 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E57C8D69 for ; Fri, 20 Oct 2023 15:27:42 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 013B3C4339A; Fri, 20 Oct 2023 22:27:42 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.96) (envelope-from ) id 1qtxy1-00AQb0-07; Fri, 20 Oct 2023 18:27:41 -0400 Message-ID: <20231020222740.846078267@goodmis.org> User-Agent: quilt/0.66 Date: Fri, 20 Oct 2023 18:27:19 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton , Jonathan Corbet Subject: [for-next][PATCH 6/6] seq_buf: fix a misleading comment References: <20231020222713.074741220@goodmis.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Jonathan Corbet The comment for seq_buf_has_overflowed() says that an overflow condition is marked by len =3D=3D size, but that's not what the code is testing. Make t= he comment match reality. Link: https://lkml.kernel.org/r/87pm19kp0m.fsf@meer.lwn.net Fixes: 8cd709ae7658a ("tracing: Have seq_buf use full buffer") Signed-off-by: Jonathan Corbet Signed-off-by: Steven Rostedt (Google) --- 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 a0fb013cebdf..8483e4b2d0d2 100644 --- a/include/linux/seq_buf.h +++ b/include/linux/seq_buf.h @@ -36,7 +36,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int s= ize) =20 /* * 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) --=20 2.42.0