linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Christoph Lameter <cl@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	linux-next@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH percpu#for-next] percpu: remove compile warnings caused by __verify_pcpu_ptr()
Date: Wed, 18 Nov 2009 18:05:41 +0900	[thread overview]
Message-ID: <4B03B8E5.7000706@kernel.org> (raw)
In-Reply-To: <20091112174558.128cea97.sfr@canb.auug.org.au>

If percpu pointer is const, __verify_pcpu_ptr() triggers warnings like
the following.

 drivers/net/loopback.c: In function 'loopback_get_stats':
 drivers/net/loopback.c:109: warning: initialization discards qualifiers from pointer target type

Fix it by adding const to the verification target pointer used in
__verify_pcpu_ptr().

Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
Sorry about the delay.  Patch committed to percpu#for-next.

Thanks.

 include/linux/percpu-defs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/percpu-defs.h b/include/linux/percpu-defs.h
index 1fa36eb..68567c0 100644
--- a/include/linux/percpu-defs.h
+++ b/include/linux/percpu-defs.h
@@ -24,7 +24,7 @@
  * input parameter is a percpu pointer.
  */
 #define __verify_pcpu_ptr(ptr)	do {					\
-	void __percpu *__vpp_verify = (typeof(ptr))NULL;		\
+	const void __percpu *__vpp_verify = (typeof(ptr))NULL;		\
 	(void)__vpp_verify;						\
 } while (0)

-- 
1.6.4.2

      parent reply	other threads:[~2009-11-18  9:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12  6:45 linux-next: percpu tree build warning Stephen Rothwell
2009-11-12 15:16 ` Christoph Lameter
2009-11-18  9:05 ` Tejun Heo [this message]

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=4B03B8E5.7000706@kernel.org \
    --to=tj@kernel.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    --cc=sfr@canb.auug.org.au \
    /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;
as well as URLs for NNTP newsgroup(s).