Commit 03f1df7da5696ddfa6e167b37e0c0ce5aad3de79

Authored by Joe Perches
Committed by Linus Torvalds
1 parent 3bf9a009fc

checkpatch: Add additional attribute #defines

On Wed, 2010-08-11 at 12:35 -0400, Dave Jones wrote:
> I just got this from a patch I merged..
>
> ERROR: need consistent spacing around '*' (ctx:WxV)
> #121: FILE: arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c:113:
> +static struct pcc_cpu __percpu *pcc_cpu_info;
>                                 ^
> which doesn't seem right.

Perhaps these need to be added to checkpatch.

[apw@canonical.com: added tests]
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Showing 1 changed file with 14 additions and 0 deletions Side-by-side Diff

scripts/checkpatch.pl
... ... @@ -152,6 +152,20 @@
152 152 # We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
153 153 our $Attribute = qr{
154 154 const|
  155 + __percpu|
  156 + __nocast|
  157 + __safe|
  158 + __bitwise__|
  159 + __packed__|
  160 + __packed2__|
  161 + __naked|
  162 + __maybe_unused|
  163 + __always_unused|
  164 + __noreturn|
  165 + __used|
  166 + __cold|
  167 + __noclone|
  168 + __deprecated|
155 169 __read_mostly|
156 170 __kprobes|
157 171 __(?:mem|cpu|dev|)(?:initdata|initconst|init\b)|