Skip to contentSkip to conversation

checkpatch false positive.

PATCH In review Dave Jones 3 participants 3 messages Aug 11, 2010 – Aug 18, 2010 Checkpatch

lore
Share & tools
lore

Dave Jones

author
#0 lore raw

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.

Dave

maintainer
#1 lore raw

PATCH 1/1 scripts/checkpatch.pl: Add additional attribute #defines

Quoted 7 lines · Dave Jones

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.

---
 scripts/checkpatch.pl |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
scripts/checkpatch.pl +14 -0
index 2039acd..51ba019 100755
@@ -150,6 +150,20 @@ our $Sparse	= qr{
 # We need \b after 'init' otherwise 'initconst' will cause a false positive in a check
 our $Attribute	= qr{
 			const|
+			__percpu|
+			__nocast|
+			__safe|
+			__bitwise__|
+			__packed__|
+			__packed2__|
+			__naked|
+			__maybe_unused|
+			__always_unused|
+			__noreturn|
+			__used|
+			__cold|
+			__noclone|
+			__deprecated|
 			__read_mostly|
 			__kprobes|
 			__(?:mem|cpu|dev|)(?:initdata|initconst|init\b)|
maintainer
#2 lore raw

Re: [PATCH] scripts/checkpatch.pl: Add additional attribute #defines

Quoted 9 lines · Joe Perches
Quoted 7 lines · Dave Jones

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.

Quoted 3 lines

Perhaps these need to be added to checkpatch.

This one looks sane to me, I've pulled this into my tree. The version at the URL below should contain it for testing:

http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing

-apw