lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa3f9880-eb05-f18e-ae7f-4735209f4c94@csgroup.eu>
Date:   Wed, 17 Mar 2021 18:17:26 +0100
From:   Christophe Leroy <christophe.leroy@...roup.eu>
To:     Peter Zijlstra <peterz@...radead.org>
Cc:     Ingo Molnar <mingo@...nel.org>, He Ying <heying24@...wei.com>,
        frederic@...nel.org, paulmck@...nel.org, clg@...d.org,
        qais.yousef@....com, johnny.chenyi@...wei.com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] smp: kernel/panic.c - silence warnings



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@...ches.com>
Suggested-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@...ux-foundation.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ