From: Jonathan Corbet <corbet@lwn.net>
To: "Steven Rostedt (Google)" <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] seq_buf: fix a misleading comment
Date: Fri, 20 Oct 2023 14:38:49 -0600 [thread overview]
Message-ID: <87pm19kp0m.fsf@meer.lwn.net> (raw)
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.
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
---
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)
--
2.41.0
next reply other threads:[~2023-10-20 20:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 20:38 Jonathan Corbet [this message]
2023-10-20 20:49 ` [PATCH] seq_buf: fix a misleading comment Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pm19kp0m.fsf@meer.lwn.net \
--to=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox