[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250526160842.567434-1-1198715581lxf@gmail.com>
Date: Tue, 27 May 2025 00:08:42 +0800
From: Jony Lynn <1198715581lxf@...il.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Valentin Schneider <vschneid@...hat.com>,
linux-kernel@...r.kernel.org
Cc: Jony Lynn <1198715581lxf@...il.com>,
kernel test robot <lkp@...el.com>
Subject: [PATCH] sched/smp: Fix redefinition of flush_smp_call_function_queue()
The header file kernel/sched/smp.h currently defines
flush_smp_call_function_queue() unconditionally in the #else branch,
but lacks appropriate header guards, which causes multiple inclusion
and a redefinition error during compilation.
This patch adds a proper header guard to prevent multiple inclusion of
kernel/sched/smp.h and thus avoid the redefinition of
flush_smp_call_function_queue() when included multiple times in
different compilation units.
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202505262213.QsOaQU24-lkp@intel.com/
Signed-off-by: Jony Lynn <1198715581lxf@...il.com>
---
kernel/sched/smp.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/sched/smp.h b/kernel/sched/smp.h
index 21ac44428bb0..8f1483b79e60 100644
--- a/kernel/sched/smp.h
+++ b/kernel/sched/smp.h
@@ -4,6 +4,9 @@
* and other internal parts of the core kernel:
*/
+#ifndef _KERNEL_SCHED_SMP_H
+#define _KERNEL_SCHED_SMP_H
+
extern void sched_ttwu_pending(void *arg);
extern bool call_function_single_prep_ipi(int cpu);
@@ -13,3 +16,5 @@ extern void flush_smp_call_function_queue(void);
#else
static inline void flush_smp_call_function_queue(void) { }
#endif
+
+#endif
--
2.43.0
Powered by blists - more mailing lists