Commit 845e31e1 authored by Jonathan Corbet's avatar Jonathan Corbet Committed by Steven Rostedt (Google)

seq_buf: fix a misleading comment

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.

Link: https://lkml.kernel.org/r/87pm19kp0m.fsf@meer.lwn.net

Fixes: 8cd709ae ("tracing: Have seq_buf use full buffer")
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
Signed-off-by: default avatarSteven Rostedt (Google) <rostedt@goodmis.org>
parent d0ed46b6
...@@ -36,7 +36,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int size) ...@@ -36,7 +36,7 @@ seq_buf_init(struct seq_buf *s, char *buf, unsigned int size)
/* /*
* seq_buf have a buffer that might overflow. When this happens * 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 static inline bool
seq_buf_has_overflowed(struct seq_buf *s) seq_buf_has_overflowed(struct seq_buf *s)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment