mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 00/14] Remove redundant extern declarations
@ 2026-11-14 16:55 Safocl Stollmannovic
  2026-11-14 16:55 ` [PATCH v3 01/14] ARM: fix duplicate " Safocl Stollmannovic
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Safocl Stollmannovic @ 2026-11-14 16:55 UTC (permalink / raw)
  Cc: linux-kernel

Compiling a kernel module with a C++ compiler results in a "duplicate
extern specifier" error.
This occurs because the code contains `extern asmlinkage`, and `asmlinkage`
expands to `extern C` when processed by a C++ compiler.
Since the code already contains sections that respond to a C++ compiler,
I believe it is a perfectly valid approach to gradually move toward a state
where kernel modules can be compiled by a C++ compiler without any issues.
The `extern` specifier must be removed.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=222257

Changes in v3:
- Split into separate patches for suspend, start_kernel, sched/task,
printk, and lockdep

Safocl Stollmannovic (14):
  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
  lockdep: fix duplicate extern declarations
  printk: fix duplicate extern declarations
  shed/task: fix duplicate extern declarations
  start_kernel: fix duplicate extern declarations
  suspend: 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] 15+ messages in thread

end of thread, other threads:[~2026-11-14 16:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 16:55 [PATCH v3 00/14] Remove redundant extern declarations Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 01/14] ARM: fix duplicate " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 02/14] loongarch: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 03/14] microblaze: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 04/14] MIPS: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 05/14] openrisc: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 06/14] riscv: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 07/14] x86: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 08/14] drivers: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 09/14] sched/preempt: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 10/14] lockdep: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 11/14] printk: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 12/14] shed/task: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 13/14] start_kernel: " Safocl Stollmannovic
2026-11-14 16:55 ` [PATCH v3 14/14] suspend: " Safocl Stollmannovic

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®