scripts/checkpatch.pl : undefined value as an ARRAY reference
Hello Andy,
On -tip git I am getting this error:
$ ./scripts/checkpatch.pl 000* Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 451.
But earlier it was working great. Is this a feature or a bug.
Thanks,
--
JSR
Quoted 9 lines · Jaswinder Singh Rajput
Hello Andy,
On -tip git I am getting this error:
$ ./scripts/checkpatch.pl 000* Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 451.But earlier it was working great. Is this a feature or a bug.
bug.
One for the akpm bucket i think, Andrew pushed v26 checkpatch to Linus yesterday:
57b9c6d: checkpatch: version: 0.26
21caa13: checkpatch: fix the perlcritic errors
2b6db5c: checkpatch: struct file_operations should normally be const
b53c8e1: checkpatch: ensure we actually detect if assignments split across lines 2d1bafd: checkpatch: do not report nr_static as a static declaration 4635f4f: checkpatch: track #ifdef/#else/#endif when tracking blocks 8b1b337: checkpatch: fix continuation detection when handling spacing on operators 8054576: checkpatch: loosen spacing on typedef function checks 080ba92: checkpatch: try to catch missing VMLINUX_SYMBOL() in vmlinux.lds.h 86f9d05: checkpatch: allow parentheses on return for comparisons 1e85572: checkpatch: Add warning for p0-patches
2a5a2c2: checkpatch: update copyrights
50a7dcf: checkpatch: version: 0.25
6586386: checkpatch: dissallow spaces between stars in pointer types
fae17da: checkpatch: comment ends inside strings is most likely not an open comment 8e761b0: checkpatch: detect multiple bitfield declarations
5fe3af1: checkpatch: __weak is an official attribute
383099f: checkpatch: structure member assignments are not complex 83242e0: checkpatch: widen implied comment detection to allow multiple stars 721c1cb: checkpatch: comment detection may miss an implied comment on the last hunk 691d77b6: checkpatch: add checks for in_atomic()
one of those is causing this new warning.
Ingo
Quoted 40 lines · Ingo Molnar
Quoted 9 lines · Jaswinder Singh Rajput
Hello Andy,
On -tip git I am getting this error:
$ ./scripts/checkpatch.pl 000* Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 451.But earlier it was working great. Is this a feature or a bug.
bug.
One for the akpm bucket i think, Andrew pushed v26 checkpatch to Linus yesterday:
57b9c6d: checkpatch: version: 0.26
21caa13: checkpatch: fix the perlcritic errors
2b6db5c: checkpatch: structfile_operationsshould normally be const
b53c8e1: checkpatch: ensure we actually detect if assignments split across lines 2d1bafd: checkpatch: do not reportnr_staticas a static declaration 4635f4f: checkpatch: track #ifdef/#else/#endif when tracking blocks 8b1b337: checkpatch: fix continuation detection when handling spacing on operators 8054576: checkpatch: loosen spacing on typedef function checks 080ba92: checkpatch: try to catch missingVMLINUX_SYMBOL()invmlinux.lds.h86f9d05: checkpatch: allow parentheses on return for comparisons 1e85572: checkpatch: Add warning for p0-patches
2a5a2c2: checkpatch: update copyrights
50a7dcf: checkpatch: version: 0.25
6586386: checkpatch: dissallow spaces between stars in pointer types
fae17da: checkpatch: comment ends inside strings is most likely not an open comment 8e761b0: checkpatch: detect multiple bitfield declarations
5fe3af1: checkpatch:__weakis an official attribute
383099f: checkpatch: structure member assignments are not complex 83242e0: checkpatch: widen implied comment detection to allow multiple stars 721c1cb: checkpatch: comment detection may miss an implied comment on the last hunk691d77b6: checkpatch: add checks forin_atomic()
Quoted 2 lines
one of those is causing this new warning.
it seems error to me :
./scripts/checkpatch.pl 0007-x86-smp.h-move-boot_cpu_id-declartion-to-cpu.h.patch Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 453.
yesterday it was working great.
Thanks
--
JSR
Quoted 9 lines · Jaswinder Singh Rajput
Hello Andy,
On -tip git I am getting this error:
$ ./scripts/checkpatch.pl 000* Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 451.But earlier it was working great. Is this a feature or a bug.
That looks wrong indeed. Assuming that is the same version I have here then that is a bug in the #else preprocessor handling. Could you send me the specific patch which is throwing this error.
Thanks.
-apw
Quoted 9 lines · Andy Whitcroft
Quoted 8 lines · Jaswinder Singh Rajput
Hello Andy,
On -tip git I am getting this error:
$ ./scripts/checkpatch.pl 000* Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 451.
Quoted 6 lines
Quoted 1 line
But earlier it was working great. Is this a feature or a bug.
That looks wrong indeed. Assuming that is the same version I have here then that is a bug in the #else preprocessor handling. Could you send me the specific patch which is throwing this error.
./scripts/checkpatch.pl 0007-x86-smp.h-move-boot_cpu_id-declartion-to-cpu.h.patch Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 453.
I am attaching this file you can also save this file from LKML
--
JSR
From 11d39b4d4aea45bd680133577ef662a78f132add Mon Sep 17 00:00:00 2001
From: Jaswinder Singh <[email protected]>
Date: Wed, 7 Jan 2009 16:34:40 +0530
Subject: [PATCH] x86: smp.h move boot_cpu_id declartion to cpu.h
Impact: cleanup, moving NON-SMP stuff from smp.h
--- arch/x86/include/asm/cpu.h | 7 +++++++ arch/x86/include/asm/smp.h | 6 ------ arch/x86/kernel/cpu/common.c | 2 +- arch/x86/kernel/io_apic.c | 1 + drivers/pci/intr_remapping.c | 1 + 5 files changed, 10 insertions(+), 7 deletions(-)
arch/x86/include/asm/cpu.h +7 -0
@@ -31,4 +31,11 @@ extern void arch_unregister_cpu(int);#endif DECLARE_PER_CPU (int, cpu_state); + +#ifdef CONFIG_X86_HAS_BOOT_CPU_ID +extern unsigned char boot_cpu_id; +#else +#define boot_cpu_id 0 +#endif +#endif /* _ASM_X86_CPU_H */
arch/x86/include/asm/smp.h +0 -6
@@ -238,11 +238,5 @@ static inline int hard_smp_processor_id(void)#endif /* CONFIG_X86_LOCAL_APIC */ -#ifdef CONFIG_X86_HAS_BOOT_CPU_ID -extern unsigned char boot_cpu_id; -#else -#define boot_cpu_id 0 -#endif -#endif /* __ASSEMBLY__ */ #endif /* _ASM_X86_SMP_H */
arch/x86/kernel/cpu/common.c +1 -1
@@ -21,7 +21,7 @@#include <asm/pat.h> #include <asm/asm.h> #include <asm/numa.h> -#include <asm/smp.h> +#include <asm/cpu.h> #ifdef CONFIG_X86_LOCAL_APIC #include <asm/mpspec.h> #include <asm/apic.h>
arch/x86/kernel/io_apic.c +1 -0
@@ -46,6 +46,7 @@#include <asm/idle.h> #include <asm/io.h> #include <asm/smp.h> +#include <asm/cpu.h> #include <asm/desc.h> #include <asm/proto.h> #include <asm/acpi.h>
drivers/pci/intr_remapping.c +1 -0
@@ -6,6 +6,7 @@#include <linux/irq.h> #include <asm/io_apic.h> #include <asm/smp.h> +#include <asm/cpu.h> #include <linux/intel-iommu.h> #include "intr_remapping.h"
Signature · 1 line
1.6.0.6
Quoted 17 lines · Jaswinder Singh Rajput
Quoted 9 lines · Andy Whitcroft
Quoted 8 lines · Jaswinder Singh Rajput
Hello Andy,
On -tip git I am getting this error:
$ ./scripts/checkpatch.pl 000* Can't use an undefined value as an ARRAY reference at ./scripts/checkpatch.pl line 451.Quoted 6 lines
Quoted 1 line
But earlier it was working great. Is this a feature or a bug.
That looks wrong indeed. Assuming that is the same version I have here then that is a bug in the #else preprocessor handling. Could you send me the specific patch which is throwing this error.
Quoted 6 lines
./scripts/checkpatch.pl0007-x86-smp.h-move-boot_cpu_id-declartion-to-cpu.h.patch Can't use an undefined value as an ARRAY reference at./scripts/checkpatch.plline 453.I am attaching this file you can also save this file from LKML
Thanks thats great. I think I have this fixed in my tree now. Can you test with the version at the url below:
http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing
-apw
Quoted 6 lines · Andy Whitcroft
Thanks thats great. I think I have this fixed in my tree now. Can you test with the version at the url below:
http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing
Thanks Andy, this works for me.
--
JSR
Quoted 9 lines · Jaswinder Singh Rajput
Quoted 6 lines · Andy Whitcroft
Thanks thats great. I think I have this fixed in my tree now. Can you test with the version at the url below:
http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-testing
Thanks Andy, this works for me.
Could we please push this fix upstream ASAP?
Ingo
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Jaswinder Singh Rajput
Quoted 4 lines · Andy Whitcroft
Thanks thats great. I think I have this fixed in my tree now. Can you test with the version at the url below:
Quoted 6 lines
Quoted 4 lines
Thanks Andy, this works for me.
Could we please push this fix upstream ASAP?
Sure. Thing. I only have a couple of patches in my queue.
-apw