public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Fix Compilation Warning in kernel/trace/trace.c
@ 2011-12-16  7:15 Devendra Naga
  2011-12-16 12:40 ` Steven Rostedt
  0 siblings, 1 reply; 3+ messages in thread
From: Devendra Naga @ 2011-12-16  7:15 UTC (permalink / raw)
  To: rostedt, fweisbec, mingo, linux-kernel; +Cc: Devendra Naga

there was a compilation warning saying
kernel/trace/trace.c:3644:8: warning: ‘page2’ may be used uninitialized in this function

The page2 pointer is used only when nr_pages = 2.

Assigned a null value to the page2 to get rid of warning.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
---
 kernel/trace/trace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index f2bd275..80dfd92 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3641,7 +3641,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
 	int nr_pages = 1;
 	ssize_t written;
 	void *page1;
-	void *page2;
+	void *page2 = NULL;
 	int offset;
 	int size;
 	int len;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-12-16 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16  7:15 [PATCH 1/1] Fix Compilation Warning in kernel/trace/trace.c Devendra Naga
2011-12-16 12:40 ` Steven Rostedt
     [not found]   ` <CAHdPZaN3KQRqSOMXV7HdJkw_T_J5D3s3pxDXY72V4iT_tR9NBQ@mail.gmail.com>
2011-12-16 15:28     ` Steven Rostedt

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