mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Zhengwang Ruan <ruan.zhengwang@gmail.com>
To: <rostedt@goodmis.org>, <fweisbec@gmail.com>, <mingo@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: [PATCH v2] Trace: Add comment to notify a warning caused by a gcc bug
Date: Thu, 1 Mar 2012 10:41:17 +0800	[thread overview]
Message-ID: <1330569677-11984-1-git-send-email-ruan.zhengwang@gmail.com> (raw)

GCC (version < 4.6) warns 'page2' is uninitialized, but this is helpful
to track a real potential bug, simply add comment to note this.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
---
v2: Change fix to add a comment.
---
 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 a3f1bc5..ef332e6 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3694,7 +3694,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf,
 	int nr_pages = 1;
 	ssize_t written;
 	void *page1;
-	void *page2;
+	void *page2;	/* if you get a warning here, upgrade your gcc to 4.6 */
 	int offset;
 	int size;
 	int len;
-- 
1.6.0.4


                 reply	other threads:[~2012-03-01  2:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1330569677-11984-1-git-send-email-ruan.zhengwang@gmail.com \
    --to=ruan.zhengwang@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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

all inboxes | Powered by JetHome®