linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>, He Ying <heying24@huawei.com>,
	frederic@kernel.org, paulmck@kernel.org, clg@kaod.org,
	qais.yousef@arm.com, johnny.chenyi@huawei.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] smp: kernel/panic.c - silence warnings
Date: Wed, 17 Mar 2021 18:17:26 +0100	[thread overview]
Message-ID: <fa3f9880-eb05-f18e-ae7f-4735209f4c94@csgroup.eu> (raw)
In-Reply-To: <YFH0sDpUIUmdpNkQ@hirez.programming.kicks-ass.net>



Le 17/03/2021 à 13:23, Peter Zijlstra a écrit :
> On Wed, Mar 17, 2021 at 12:00:29PM +0100, Christophe Leroy wrote:
>> What do you mean ? 'extern' prototype is pointless for function prototypes
>> and deprecated, no new function prototypes should be added with the 'extern'
>> keyword.
>>
>> checkpatch.pl tells you: "extern prototypes should be avoided in .h files"
> 
> I have a very strong preference for extern on function decls, to match
> the extern on variable decl.

You mean you also do 'static inline' variable declarations ?

I think you just can't compare variable declarations and function declaration, that's too different.

> 
> Checkpatch is just wrong here.
> 

checkpatch seems rather pragmatic, the commit message says:

  checkpatch: warn when using extern with function prototypes in .h files

Using the extern keyword on function prototypes is superfluous visual
noise so suggest removing it.

Using extern can cause unnecessary line wrapping at 80 columns and
unnecessarily long multi-line function prototypes.

Signed-off-by: Joe Perches <joe@perches.com>
Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

  reply	other threads:[~2021-03-17 17:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-16  8:41 [PATCH v2] smp: kernel/panic.c - silence warnings He Ying
2021-03-17  9:49 ` Ingo Molnar
2021-03-17 11:00   ` Christophe Leroy
2021-03-17 12:23     ` Peter Zijlstra
2021-03-17 17:17       ` Christophe Leroy [this message]
2021-03-17 17:37         ` Peter Zijlstra
2021-03-17 20:09           ` Ingo Molnar
2021-03-18  2:56             ` heying (H)
2021-03-18  6:11               ` Christophe Leroy
2021-03-18  6:04             ` Christophe Leroy
2021-03-18  5:53           ` Christophe Leroy
2021-03-19  1:39             ` heying (H)
2021-03-19  6:58               ` Christophe Leroy

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=fa3f9880-eb05-f18e-ae7f-4735209f4c94@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=clg@kaod.org \
    --cc=frederic@kernel.org \
    --cc=heying24@huawei.com \
    --cc=johnny.chenyi@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulmck@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qais.yousef@arm.com \
    /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;
as well as URLs for NNTP newsgroup(s).