From: Andrew Morton <akpm@osdl.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Russell King <rmk@arm.linux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Linus Torvalds <torvalds@osdl.org>, Andi Kleen <ak@muc.de>
Subject: Re: [NET]: Shut up warnings in net/core/flow.c
Date: Wed, 23 Nov 2005 00:21:34 -0800 [thread overview]
Message-ID: <20051123002134.287ff226.akpm@osdl.org> (raw)
In-Reply-To: <200511230159.jAN1xeMl003154@hera.kernel.org>
Linux Kernel Mailing List <linux-kernel@vger.kernel.org> wrote:
>
> tree e7ba0f1bc8764c36859e2cfa9421bb1d86f2e7f4
> parent b3a5225f31180322fd7d692fd4cf786702826b94
> author Russell King <rmk+kernel@arm.linux.org.uk> Wed, 23 Nov 2005 06:38:04 -0800
> committer David S. Miller <davem@davemloft.net> Wed, 23 Nov 2005 06:38:04 -0800
>
> [NET]: Shut up warnings in net/core/flow.c
>
> Not really a network problem, more a !SMP issue.
>
> net/core/flow.c:295: warning: statement with no effect
>
> flow.c:295: smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0);
>
> Fix this by converting the macro to an inline function, which
> also increases the typechecking for !SMP builds.
Nope, this will break !CONFIG_SMP builds. Quite a few places in the kernel
do not implement the ipi handler if !CONFIG_SMP.
diff -puN include/linux/smp.h~smp_call_function-must-be-a-macro include/linux/smp.h
--- devel/include/linux/smp.h~smp_call_function-must-be-a-macro 2005-11-23 00:14:19.000000000 -0800
+++ devel-akpm/include/linux/smp.h 2005-11-23 00:20:54.000000000 -0800
@@ -94,13 +94,7 @@ void smp_prepare_boot_cpu(void);
*/
#define raw_smp_processor_id() 0
#define hard_smp_processor_id() 0
-
-static inline int smp_call_function(void (*func) (void *info), void *info,
- int retry, int wait)
-{
- return 0;
-}
-
+#define smp_call_function(func,info,retry,wait) ({ 0; })
#define on_each_cpu(func,info,retry,wait) ({ func(info); 0; })
static inline void smp_send_reschedule(int cpu) { }
#define num_booting_cpus() 1
diff -puN net/core/flow.c~smp_call_function-must-be-a-macro net/core/flow.c
--- devel/net/core/flow.c~smp_call_function-must-be-a-macro 2005-11-23 00:17:40.000000000 -0800
+++ devel-akpm/net/core/flow.c 2005-11-23 00:17:47.000000000 -0800
@@ -292,7 +292,7 @@ void flow_cache_flush(void)
init_completion(&info.completion);
local_bh_disable();
- smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0);
+ (void)smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0);
flow_cache_flush_tasklet((unsigned long)&info);
local_bh_enable();
_
next parent reply other threads:[~2005-11-23 8:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200511230159.jAN1xeMl003154@hera.kernel.org>
2005-11-23 8:21 ` Andrew Morton [this message]
2005-11-23 8:55 ` David S. Miller
2005-11-23 9:11 ` Arjan van de Ven
2005-11-23 21:24 ` David S. Miller
2005-11-23 21:28 ` Arjan van de Ven
2005-11-23 22:02 ` David S. Miller
2005-11-23 16:54 ` Linus Torvalds
2005-11-23 23:20 ` David S. Miller
2005-11-23 23:29 ` Linus Torvalds
2005-11-24 0:53 ` David S. Miller
2005-11-24 7:46 ` Arjan van de Ven
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=20051123002134.287ff226.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ak@muc.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
--cc=torvalds@osdl.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®