From: Joe Perches <joe@perches.com>
To: Lee Revell <rlrevell@joe-job.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: Re: arch/i386/kernel/nmi.c: fix compiler warning
Date: Thu, 26 Jan 2006 13:08:21 -0800 [thread overview]
Message-ID: <1138309701.27471.12.camel@localhost> (raw)
In-Reply-To: <1138307625.30814.13.camel@mindpipe>
On Thu, 2006-01-26 at 15:33 -0500, Lee Revell wrote:
> arch/i386/kernel/nmi.c: In function 'check_nmi_watchdog':
> arch/i386/kernel/nmi.c:139: warning: statement with no effect
A more generic solution:
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 9dfa3ee..be4e598 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -90,12 +90,25 @@ void smp_prepare_boot_cpu(void);
#else /* !SMP */
/*
- * These macros fold the SMP functionality into a single CPU system
+ * These macros and inlines fold the SMP functionality
+ * for single CPU systems
*/
#define raw_smp_processor_id() 0
#define hard_smp_processor_id() 0
-#define smp_call_function(func,info,retry,wait) ({ 0; })
-#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
+
+static inline int smp_call_function(void (*func) (void *info), void *info,
+ int retry, int wait)
+{
+ return 0;
+}
+
+static inline int on_each_cpu(void (*func) (void *info), void *info,
+ int retry, int wait)
+{
+ func(info);
+ return 0;
+}
+
static inline void smp_send_reschedule(int cpu) { }
#define num_booting_cpus() 1
#define smp_prepare_boot_cpu() do {} while (0)
next prev parent reply other threads:[~2006-01-26 21:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-26 20:33 arch/i386/kernel/nmi.c: fix compiler warning Lee Revell
2006-01-26 21:08 ` Joe Perches [this message]
2006-01-27 23:34 ` Andrew Morton
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=1138309701.27471.12.camel@localhost \
--to=joe@perches.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rlrevell@joe-job.com \
/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).