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] [day] [month] [year] [list]
Message-ID: <1408367905.5871.5.camel@joe-AO725>
Date:	Mon, 18 Aug 2014 06:18:25 -0700
From:	Joe Perches <joe@...ches.com>
To:	Arun Chandran <achandran@...sta.com>
Cc:	linux-kernel@...r.kernel.org, Andy Whitcroft <apw@...onical.com>,
	Geoff Levand <geoff@...radead.org>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: checkpatch.pl: Use of extern in function prototype

On Mon, 2014-08-18 at 15:09 +0530, Arun Chandran wrote:
> Hi,
> 
> I have a piece of code as shown below.
> 
> #######################
> diff --git a/arch/arm64/include/asm/proc-fns.h
> b/arch/arm64/include/asm/proc-fns.h
> index 9a8fd84..86be4f9 100644
> --- a/arch/arm64/include/asm/proc-fns.h
> +++ b/arch/arm64/include/asm/proc-fns.h
> @@ -32,7 +32,7 @@ extern void cpu_cache_off(void);
>  extern void cpu_do_idle(void);
>  extern void cpu_do_switch_mm(unsigned long pgd_phys, struct mm_struct *mm);
>  extern void cpu_reset(unsigned long addr) __attribute__((noreturn));
> +extern void cpu_soft_restart(phys_addr_t cpu_reset,
>                 unsigned long addr) __attribute__((noreturn));
>  extern void cpu_do_suspend(struct cpu_suspend_ctx *ptr);
>  extern u64 cpu_do_resume(phys_addr_t ptr, u64 idmap_ttbr);
> ########################
> 
> Other lines had an "extern" in them I also added it blindly.
> when the above code is given checkpatch.pl did not throw any
> error/warning,; but I got this reply
> 
> http://lists.infradead.org/pipermail/linux-arm-kernel/2014-August/279691.html
> 
> [[As the functions have external linkage by default, the extern keyword is
> irrelevant in this case.]]
> 
> Does checkpatch.pl misbehave in my case?

checkpatch's "unnecessary extern" message is somewhat controversial.

It requires the use of "--strict" on the command line.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ