Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1681180
| From | Joe Perches <joe@perches.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [BUG] checkpatch: false positive storage class location |
| Date | 2017-07-04 22:50 +0200 |
| Message-ID | <tZCVI-4Yl-5@gated-at.bofh.it> (permalink) |
| References | <tZBGi-4i7-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2017-07-04 at 21:29 +0200, Heinrich Schuchardt wrote:
> The U-Boot project uses the same scripts/checkpatch.pl as the Linux
> kernel. I ran upon the problem below when working on U-Boot. But I
> guess it should be fixed in the Linux upstream.
>
> Running checkpatch for this email produces
> WARNING: storage class should be at the beginning of the declaration
>
> This relates to the parameter with asmlinkage.
>
> asmlinkage is at the start of the parameter so I think this a false
> positive.
>
> Signed-off-by: Heinrich.Schuchardt <xypron.glpk@gmx.de>
> ---
>
> cmd/bootefi.c | 22 +++++++++++++++++-----
> 1 file changed, 17 insertions(+), 5 deletions(-)
>
> diff --git a/cmd/bootefi.c b/cmd/bootefi.c
> index 771300ee94..4df468307c 100644
> --- a/cmd/bootefi.c
> +++ b/cmd/bootefi.c
> @@ -147,6 +147,12 @@ static void *copy_fdt(void *fdt)
> return new_fdt;
> }
>
> +static ulong efi_do_enter(void *image_handle,
> + struct efi_system_table *st, asmlinkage ulong (*entry)(
> + void *image_handle, struct efi_system_table *st))
> +{
> + return 0;
> +}
> +
> /*
> end
> */
Perhaps this?
-------------------------
Allow storage class after comma for function pointers.
Miscellanea:
o Add missing semicolon after WARN statement
---
scripts/checkpatch.pl | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 43171ed88115..c7490ab48ce1 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5577,9 +5577,10 @@ sub process {
}
# Check that the storage class is at the beginning of a declaration
- if ($line =~ /\b$Storage\b/ && $line !~ /^.\s*$Storage\b/) {
+ if ($line =~ /\b$Storage\b/ &&
+ $line !~ /^.\s*(?:.*,\s*)?$Storage\b/) {
WARN("STORAGE_CLASS",
- "storage class should be at the beginning of the declaration\n" . $herecurr)
+ "storage class should be at the beginning of the declaration\n" . $herecurr);
}
# check the location of the inline attribute, that it is between
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[BUG] checkpatch: false positive storage class location Heinrich Schuchardt <xypron.glpk@gmx.de> - 2017-07-04 21:30 +0200
Re: [BUG] checkpatch: false positive storage class location Joe Perches <joe@perches.com> - 2017-07-04 22:50 +0200
Re: [BUG] checkpatch: false positive storage class location Heinrich Schuchardt <xypron.glpk@gmx.de> - 2017-07-04 23:10 +0200
Re: [BUG] checkpatch: false positive storage class location Joe Perches <joe@perches.com> - 2017-07-05 14:10 +0200
csiph-web