* Re: [PATCH 09/10] sched/preempt: fix duplicate extern declarations
@ 2026-11-13 12:02 Safocl
2026-11-13 12:36 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Safocl @ 2026-11-13 12:02 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-arch, linux-kernel, Safocl
but it contains `asmlinkage`, which includes `extern "C"` when
`__cplusplus` is defined...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 09/10] sched/preempt: fix duplicate extern declarations
@ 2026-11-13 12:48 Safocl
0 siblings, 0 replies; 5+ messages in thread
From: Safocl @ 2026-11-13 12:48 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-arch, linux-kernel, Safocl
Perhaps it’s worth making a change now to ensure some consistency? At
your discretion, you could remove such `extern` specifiers for
functions entirely (along with `asmlinkage`), as they are redundant —
or, alternatively, remove just one of them.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 00/10] Remove duplicate extern declarations
@ 2026-11-13 0:14 Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 09/10] sched/preempt: fix " Safocl Stollmannovic
0 siblings, 1 reply; 5+ messages in thread
From: Safocl Stollmannovic @ 2026-11-13 0:14 UTC (permalink / raw)
Cc: linux-kernel
Compiling a kernel module with a C++ compiler results in a duplicate
echo ‘extern’ specifier error.
This occurs because the code contains , and
expands to when processed by a C++ compiler.
The specifier must be removed.
https://bugzilla.kernel.org/show_bug.cgi?id=222257
Safocl Stollmannovic (10):
ARM: fix duplicate extern declarations
loongarch: fix duplicate extern declarations
microblaze: fix duplicate extern declarations
MIPS: fix duplicate extern declarations
openrisc: fix duplicate extern declarations
riscv: fix duplicate extern declarations
x86: fix duplicate extern declarations
drivers: fix duplicate extern declarations
sched/preempt: fix duplicate extern declarations
kernel: fix duplicate extern declarations
arch/arm/include/asm/bug.h | 2 +-
arch/arm/include/asm/opcodes.h | 2 +-
arch/loongarch/include/asm/idle.h | 2 +-
arch/loongarch/include/asm/smp.h | 4 +-
arch/loongarch/include/asm/switch_to.h | 2 +-
arch/microblaze/include/asm/entry.h | 2 +-
arch/microblaze/kernel/microblaze_ksyms.c | 2 +-
arch/mips/cavium-octeon/setup.c | 2 +-
arch/mips/include/asm/bmips.h | 2 +-
arch/mips/include/asm/idle.h | 2 +-
arch/mips/include/asm/paccess.h | 4 +-
arch/mips/include/asm/ptrace.h | 4 +-
arch/mips/include/asm/smp.h | 2 +-
arch/mips/include/asm/switch_to.h | 2 +-
arch/mips/kernel/r4k-bugs64.c | 2 +-
arch/mips/kernel/signal-common.h | 8 ++--
arch/mips/kernel/traps.c | 50 +++++++++++------------
arch/openrisc/kernel/process.c | 2 +-
arch/riscv/include/asm/string.h | 24 +++++------
arch/riscv/kernel/process.c | 4 +-
arch/riscv/kernel/stacktrace.c | 2 +-
arch/x86/include/asm/efi.h | 2 +-
arch/x86/include/asm/gsseg.h | 2 +-
arch/x86/include/asm/preempt.h | 8 ++--
arch/x86/include/asm/processor.h | 2 +-
arch/x86/include/asm/suspend.h | 2 +-
arch/x86/um/sys_call_table_32.c | 4 +-
arch/x86/um/sys_call_table_64.c | 4 +-
drivers/soc/bcm/brcmstb/pm/pm.h | 6 +--
include/asm-generic/preempt.h | 4 +-
include/linux/lockdep.h | 2 +-
include/linux/printk.h | 6 +--
include/linux/sched/task.h | 2 +-
include/linux/start_kernel.h | 2 +-
include/linux/suspend.h | 4 +-
35 files changed, 88 insertions(+), 88 deletions(-)
--
2.56.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 09/10] sched/preempt: fix duplicate extern declarations
2026-11-13 0:14 [PATCH 00/10] Remove " Safocl Stollmannovic
@ 2026-11-13 0:14 ` Safocl Stollmannovic
2026-11-13 8:37 ` Arnd Bergmann
0 siblings, 1 reply; 5+ messages in thread
From: Safocl Stollmannovic @ 2026-11-13 0:14 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, linux-arch
Compiling a kernel module with a C++ compiler results in a duplicate
echo ‘extern’ specifier error.
This occurs because the code contains , and
expands to when processed by a C++ compiler.
The specifier must be removed.
https://bugzilla.kernel.org/show_bug.cgi?id=222257
Signed-off-by: Safocl Stollmannovic <safocl88@gmail.com>
---
include/asm-generic/preempt.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/asm-generic/preempt.h b/include/asm-generic/preempt.h
index 1adddeab8..fc0da591d 100644
--- a/include/asm-generic/preempt.h
+++ b/include/asm-generic/preempt.h
@@ -93,8 +93,8 @@ static __always_inline bool should_resched(int preempt_offset)
}
#ifdef CONFIG_PREEMPTION
-extern asmlinkage void preempt_schedule(void);
-extern asmlinkage void preempt_schedule_notrace(void);
+asmlinkage void preempt_schedule(void);
+asmlinkage void preempt_schedule_notrace(void);
#define __preempt_schedule() preempt_schedule()
#define __preempt_schedule_notrace() preempt_schedule_notrace()
--
2.56.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 09/10] sched/preempt: fix duplicate extern declarations
2026-11-13 0:14 ` [PATCH 09/10] sched/preempt: fix " Safocl Stollmannovic
@ 2026-11-13 8:37 ` Arnd Bergmann
0 siblings, 0 replies; 5+ messages in thread
From: Arnd Bergmann @ 2026-11-13 8:37 UTC (permalink / raw)
To: Safocl Stollmannovic; +Cc: linux-kernel, Linux-Arch
On Fri, Nov 13, 2026, at 01:14, Safocl Stollmannovic wrote:
> Compiling a kernel module with a C++ compiler results in a duplicate
> echo ‘extern’ specifier error.
> This occurs because the code contains , and
> expands to when processed by a C++ compiler.
> The specifier must be removed.
> https://bugzilla.kernel.org/show_bug.cgi?id=222257
The changelog text makes no sense. We don't support building the
kernel with C++ and this is not a user-visible header.
Leaving out the 'extern' in declarations is just a preference
in coding style, no need to send patches for that.
Arnd
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-13 12:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13 12:02 [PATCH 09/10] sched/preempt: fix duplicate extern declarations Safocl
2026-11-13 12:36 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2026-11-13 12:48 Safocl
2026-11-13 0:14 [PATCH 00/10] Remove " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 09/10] sched/preempt: fix " Safocl Stollmannovic
2026-11-13 8:37 ` Arnd Bergmann
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®