mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] 2.5.32-smph
@ 2002-08-30 21:39 Russell King
  2002-08-31  5:21 ` Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King @ 2002-08-30 21:39 UTC (permalink / raw)
  To: LKML

This patch appears not to be in 2.5.32, but applies cleanly.

Use of cpu_online on UP causes the following warnings:

page_alloc.c:555: warning: statement with no effect
proc_misc.c:297: warning: statement with no effect
proc_misc.c:313: warning: statement with no effect
dev.c:1824: warning: statement with no effect

This patch fixes these warnings.

 include/linux/smp.h |    2 +-
 1 files changed, 1 insertion, 1 deletion

--- orig/include/linux/smp.h	Fri Aug 30 14:53:33 2002
+++ linux/include/linux/smp.h	Fri Aug 30 14:51:19 2002
@@ -94,7 +94,7 @@
 static inline void smp_send_reschedule(int cpu) { }
 static inline void smp_send_reschedule_all(void) { }
 #define cpu_online_map				1
-#define cpu_online(cpu)				({ cpu; 1; })
+#define cpu_online(cpu)				({ (void)cpu; 1; })
 #define num_online_cpus()			1
 #define num_booting_cpus()			1
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] 2.5.32-smph
  2002-08-30 21:39 [PATCH] 2.5.32-smph Russell King
@ 2002-08-31  5:21 ` Rusty Russell
  0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2002-08-31  5:21 UTC (permalink / raw)
  To: Russell King; +Cc: LKML, torvalds

In message <E17ktU3-00035O-00@flint.arm.linux.org.uk> you write:
> This patch appears not to be in 2.5.32, but applies cleanly.
> 
> Use of cpu_online on UP causes the following warnings:
> 
> page_alloc.c:555: warning: statement with no effect
> proc_misc.c:297: warning: statement with no effect
> proc_misc.c:313: warning: statement with no effect
> dev.c:1824: warning: statement with no effect
> 
> This patch fixes these warnings.

I prefer this fix, which also adds cpu_possible(i) for UP.

Name: cpu_possible for UP
Author: Rusty Russell
Status: Trivial

D: This patch defines cpu_possible() for non-SMP.

diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal linux-2.5.32/include/linux/smp.h working-2.5.32-cpu-possible/include/linux/smp.h
--- linux-2.5.32/include/linux/smp.h	2002-08-28 09:29:53.000000000 +1000
+++ working-2.5.32-cpu-possible/include/linux/smp.h	2002-08-29 15:30:49.000000000 +1000
@@ -94,9 +94,10 @@ int cpu_up(unsigned int cpu);
 static inline void smp_send_reschedule(int cpu) { }
 static inline void smp_send_reschedule_all(void) { }
 #define cpu_online_map				1
-#define cpu_online(cpu)				({ cpu; 1; })
+#define cpu_online(cpu)				({ BUG_ON((cpu) != 0); 1; })
 #define num_online_cpus()			1
 #define num_booting_cpus()			1
+#define cpu_possible(i)				({ BUG_ON((cpu) != 0); 1; })
 
 struct notifier_block;
 
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-31  5:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-30 21:39 [PATCH] 2.5.32-smph Russell King
2002-08-31  5:21 ` Rusty Russell

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®