From: Safocl Stollmannovic <safocl88@gmail.com>
To: Huacai Chen <chenhuacai@kernel.org>, WANG Xuerui <kernel@xen0n.name>
Cc: linux-kernel@vger.kernel.org, loongarch@lists.linux.dev
Subject: [PATCH 02/10] loongarch: fix duplicate extern declarations
Date: Fri, 13 Nov 2026 04:14:08 +0400 [thread overview]
Message-ID: <20261113001432.128201-3-safocl88@gmail.com> (raw)
In-Reply-To: <20261113001432.128201-1-safocl88@gmail.com>
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>
---
arch/loongarch/include/asm/idle.h | 2 +-
arch/loongarch/include/asm/smp.h | 4 ++--
arch/loongarch/include/asm/switch_to.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/loongarch/include/asm/idle.h b/arch/loongarch/include/asm/idle.h
index f7f2b7dbf..9913191cb 100644
--- a/arch/loongarch/include/asm/idle.h
+++ b/arch/loongarch/include/asm/idle.h
@@ -4,6 +4,6 @@
#include <linux/linkage.h>
-extern asmlinkage void __arch_cpu_idle(void);
+asmlinkage void __arch_cpu_idle(void);
#endif /* __ASM_IDLE_H */
diff --git a/arch/loongarch/include/asm/smp.h b/arch/loongarch/include/asm/smp.h
index dd1457065..c21a5b60e 100644
--- a/arch/loongarch/include/asm/smp.h
+++ b/arch/loongarch/include/asm/smp.h
@@ -87,8 +87,8 @@ struct secondary_data {
};
extern struct secondary_data cpuboot_data;
-extern asmlinkage void smpboot_entry(void);
-extern asmlinkage void start_secondary(void);
+asmlinkage void smpboot_entry(void);
+asmlinkage void start_secondary(void);
extern void calculate_cpu_foreign_map(void);
diff --git a/arch/loongarch/include/asm/switch_to.h b/arch/loongarch/include/asm/switch_to.h
index ab9e0292c..aa5d3da68 100644
--- a/arch/loongarch/include/asm/switch_to.h
+++ b/arch/loongarch/include/asm/switch_to.h
@@ -21,7 +21,7 @@ struct task_struct;
* This function is used whilst scheduling to save the context of prev & load
* the context of next. Returns prev.
*/
-extern asmlinkage struct task_struct *__switch_to(struct task_struct *prev,
+asmlinkage struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *next, void *sched_ra, void *sched_cfa);
/*
--
2.56.1
next prev parent reply other threads:[~2026-11-13 0:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 0:14 [PATCH 00/10] Remove " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 01/10] ARM: fix " Safocl Stollmannovic
2026-11-13 0:14 ` Safocl Stollmannovic [this message]
2026-11-13 0:14 ` [PATCH 03/10] microblaze: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 04/10] MIPS: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 05/10] openrisc: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 06/10] riscv: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 07/10] x86: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 08/10] drivers: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 09/10] sched/preempt: " Safocl Stollmannovic
2026-11-13 0:14 ` [PATCH 10/10] kernel: " Safocl Stollmannovic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113001432.128201-3-safocl88@gmail.com \
--to=safocl88@gmail.com \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®