public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Remove unnecessary WARN_ONCE's from tracing_buffers_splice_read
@ 2012-07-25 15:39 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2012-07-25 15:39 UTC (permalink / raw)
  To: rostedt; +Cc: Linux Kernel

WARN shouldn't be used as a means of communicating failure to a userspace programmer.

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ed7b5d1..a745317 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4136,13 +4136,11 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos,
 		return -ENOMEM;
 
 	if (*ppos & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: previous read must page-align\n");
 		ret = -EINVAL;
 		goto out;
 	}
 
 	if (len & (PAGE_SIZE - 1)) {
-		WARN_ONCE(1, "Ftrace: splice_read should page-align\n");
 		if (len < PAGE_SIZE) {
 			ret = -EINVAL;
 			goto out;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-07-25 15:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-25 15:39 Remove unnecessary WARN_ONCE's from tracing_buffers_splice_read Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox