From: Namhyung Kim <namhyung@gmail.com>
To: tj@kernel.org
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] percpu: remove address_space attribute if !SMP
Date: Fri, 6 Aug 2010 21:46:08 +0900 [thread overview]
Message-ID: <1281098768-5724-1-git-send-email-namhyung@gmail.com> (raw)
percpu data has no special meaning in case of !CONFIG_SMP.
This removes lots of sparse warnings.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index a5a472b..8dfd41d 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -15,7 +15,11 @@
# define __acquire(x) __context__(x,1)
# define __release(x) __context__(x,-1)
# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
-# define __percpu __attribute__((noderef, address_space(3)))
+# ifdef CONFIG_SMP
+# define __percpu __attribute__((noderef, address_space(3)))
+# else
+# define __percpu
+# endif
extern void __chk_user_ptr(const volatile void __user *);
extern void __chk_io_ptr(const volatile void __iomem *);
#else
--
1.7.0.4
next reply other threads:[~2010-08-06 12:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 12:46 Namhyung Kim [this message]
2010-08-06 12:49 ` Tejun Heo
2010-08-06 12:53 ` Namhyung Kim
2010-08-06 12:57 ` Tejun Heo
2010-08-06 13:23 ` Namhyung Kim
2010-08-06 13:37 ` Tejun Heo
2010-08-06 13:46 ` Namhyung Kim
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=1281098768-5724-1-git-send-email-namhyung@gmail.com \
--to=namhyung@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.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®