mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Nam Cao <namcao@linutronix.de>,
	Andy Whitcroft <apw@canonical.com>,
	 Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>,
		linux-kernel@vger.kernel.org
Subject: Re: Checkpatch false positive: externs should be avoided in .c files
Date: Mon, 02 Feb 2026 07:24:21 -0800	[thread overview]
Message-ID: <feb0871ae121e8bd0374cba5fc43bd8dc7315509.camel@perches.com> (raw)
In-Reply-To: <875x8fz6yz.fsf@yellow.woof>

On Mon, 2026-02-02 at 13:05 +0100, Nam Cao wrote:
> Hi,

Hi Nam.

I was very confused for a second.
I have a friend with your name.
He's not someone who would use checkpatch.

I'll look at it.

cheers, Joe

> 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

  reply	other threads:[~2026-02-02 15:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-02 12:05 Nam Cao
2026-02-02 15:24 ` Joe Perches [this message]
2026-02-03  5:57 ` Joe Perches
2026-02-04  7:28   ` Nam Cao

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=feb0871ae121e8bd0374cba5fc43bd8dc7315509.camel@perches.com \
    --to=joe@perches.com \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    --cc=namcao@linutronix.de \
    /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®