Skip to content

Commit 022b973

Browse files
Alexey Dobriyanakpm00
authored andcommitted
smp: make __smp_processor_id() 0-argument macro
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. Link: https://lkml.kernel.org/r/0037d1f2-8153-4b33-b43e-f4b6ecd710ac@p183 Signed-off-by: Alexey Dobriyan <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent fde2497 commit 022b973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/smp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ static inline int get_boot_cpu_id(void)
261261
* regular asm read for the stable.
262262
*/
263263
#ifndef __smp_processor_id
264-
#define __smp_processor_id(x) raw_smp_processor_id(x)
264+
#define __smp_processor_id() raw_smp_processor_id()
265265
#endif
266266

267267
#ifdef CONFIG_DEBUG_PREEMPT

0 commit comments

Comments
 (0)