From: "Manish Katiyar" <mkatiyar@gmail.com>
To: LKML <linux-kernel@vger.kernel.org>,
trivial@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] Remove "unused variable" warning in arch/x86/xen/setup.c on UP systems.
Date: Sat, 17 May 2008 09:41:10 +0530 [thread overview]
Message-ID: <ea11fea30805162111v42f86555i816ec6915a89da3e@mail.gmail.com> (raw)
On UP systems cpu_data is defined as boot_cpu_data, due to which we
get the below error while compiling xen.
CC arch/x86/xen/setup.o
arch/x86/xen/setup.c: In function 'xen_enable_sysenter':
arch/x86/xen/setup.c:74: warning: unused variable 'cpu'
The below patch defines the variable only when SMP is defined.
Signed-off-by : Manish Katiyar <mkatiyar@gmail.com>
diff -Nur a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
--- a/arch/x86/xen/setup.c 2008-04-26 20:36:15.000000000 +0530
+++ b/arch/x86/xen/setup.c 2008-05-17 09:30:12.000000000 +0530
@@ -71,7 +71,9 @@
void xen_enable_sysenter(void)
{
+#ifdef CONFIG_SMP
int cpu = smp_processor_id();
+#endif
extern void xen_sysenter_target(void);
/* Mask events on entry, even though they get enabled immediately */
static struct callback_register sysenter = {
--
Thanks & Regards,
********************************************
Manish Katiyar ( http://mkatiyar.googlepages.com )
3rd Floor, Fair Winds Block
EGL Software Park
Off Intermediate Ring Road
Bangalore 560071, India
***********************************************
reply other threads:[~2008-05-17 4:11 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=ea11fea30805162111v42f86555i816ec6915a89da3e@mail.gmail.com \
--to=mkatiyar@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=trivial@vger.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®