public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Checkpatch false positive: externs should be avoided in .c files
@ 2026-02-02 12:05 Nam Cao
  2026-02-02 15:24 ` Joe Perches
  2026-02-03  5:57 ` Joe Perches
  0 siblings, 2 replies; 4+ messages in thread
From: Nam Cao @ 2026-02-02 12:05 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn,
	linux-kernel

Hi,

checkpatch seems to give a wrong warning about this patch:
https://lore.kernel.org/linux-riscv/20260202115403.2119218-1-namcao@linutronix.de/T/#u

WARNING: externs should be avoided in .c files
#663: FILE: arch/riscv/kernel/setup.c:49:
+atomic_t hart_lottery __section(".sdata");

I think this is wrong, because 'extern' does not even appear anywhere in
that part of the diff.

I attempted to look into checkpatch, but my perl knowledge is not
sufficient to dig deeper into this issue. Can you please have a look?

Best regards,
Nam

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-04  7:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-02 12:05 Checkpatch false positive: externs should be avoided in .c files Nam Cao
2026-02-02 15:24 ` Joe Perches
2026-02-03  5:57 ` Joe Perches
2026-02-04  7:28   ` Nam Cao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox