mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] smp: make __smp_processor_id() 0-argument macro
@ 2024-02-05  9:39 Alexey Dobriyan
  2024-02-19 17:16 ` [tip: smp/core] smp: Make " tip-bot2 for Alexey Dobriyan
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2024-02-05  9:39 UTC (permalink / raw)
  To: peterz, akpm; +Cc: linux-kernel

smp_processor_id family of macros never accepted any arguments.

	#define __smp_processor_id(x)

works by accident (see C99 6.10.3 §4). __smp_processor_id() gets
1 (empty) argument and passes it down to raw_smp_processor_id()
which doesn't accept arguments.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 include/linux/smp.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -261,7 +261,7 @@ static inline int get_boot_cpu_id(void)
  * regular asm read for the stable.
  */
 #ifndef __smp_processor_id
-#define __smp_processor_id(x) raw_smp_processor_id(x)
+#define __smp_processor_id() raw_smp_processor_id()
 #endif
 
 #ifdef CONFIG_DEBUG_PREEMPT

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

end of thread, other threads:[~2024-02-19 17:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-05  9:39 [PATCH] smp: make __smp_processor_id() 0-argument macro Alexey Dobriyan
2024-02-19 17:16 ` [tip: smp/core] smp: Make " tip-bot2 for Alexey Dobriyan

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®