seq_buf: Add seq_buf_can_fit() helper function
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>
Fri, 14 Nov 2014 21:18:14 +0000 (16:18 -0500)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 20 Nov 2014 03:01:17 +0000 (22:01 -0500)
commit9b77215382b42ef9c5b34293ad3a95332e5b71ef
treec27b128e42421c1d901213c50584e886a0c09af1
parent820b75f63d0152dbb9ff4accf274408592d613f2
seq_buf: Add seq_buf_can_fit() helper function

Add a seq_buf_can_fit() helper function that removes the possible mistakes
of comparing the seq_buf length plus added data compared to the size of
the buffer.

Link: http://lkml.kernel.org/r/20141118164025.GL23958@pathway.suse.cz
Reviewed-by: Petr Mladek <pmladek@suse.cz>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/seq_buf.c