[PATCH v3 08/14] drivers: fix duplicate extern declarations

Florian Fainelli florian.fainelli at broadcom.com
Mon Nov 16 09:31:39 PST 2026


On 11/14/26 08:55, Safocl Stollmannovic wrote:
> 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
> Signed-off-by: Safocl Stollmannovic <safocl88 at gmail.com>

I applied v2 which was not different to this tree:

https://github.com/Broadcom/stblinux/commit/0cab822bca7a59667774725b83e948b71462290f

the subject was reworded because yours was not specific enough and did 
not match contributions made to this file previously.
-- 
Florian



More information about the linux-arm-kernel mailing list