* scripts/checkpatch.pl : undefined value as an ARRAY reference
@ 2009-01-07 12:54 Jaswinder Singh Rajput
2009-01-07 13:04 ` Ingo Molnar
2009-01-07 13:07 ` Andy Whitcroft
0 siblings, 2 replies; 9+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-07 12:54 UTC (permalink / raw)
To: apw, davej, Ingo Molnar, LKML
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-07 12:54 scripts/checkpatch.pl : undefined value as an ARRAY reference Jaswinder Singh Rajput
@ 2009-01-07 13:04 ` Ingo Molnar
2009-01-07 13:34 ` Jaswinder Singh Rajput
2009-01-07 13:07 ` Andy Whitcroft
1 sibling, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2009-01-07 13:04 UTC (permalink / raw)
To: Jaswinder Singh Rajput, Andrew Morton; +Cc: apw, davej, LKML
* Jaswinder Singh Rajput <jaswinderlinux@gmail.com> wrote:
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-07 12:54 scripts/checkpatch.pl : undefined value as an ARRAY reference Jaswinder Singh Rajput
2009-01-07 13:04 ` Ingo Molnar
@ 2009-01-07 13:07 ` Andy Whitcroft
2009-01-07 13:27 ` Jaswinder Singh Rajput
1 sibling, 1 reply; 9+ messages in thread
From: Andy Whitcroft @ 2009-01-07 13:07 UTC (permalink / raw)
To: Jaswinder Singh Rajput; +Cc: davej, Ingo Molnar, LKML
On Wed, Jan 07, 2009 at 06:24:55PM +0530, Jaswinder Singh Rajput wrote:
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-07 13:07 ` Andy Whitcroft
@ 2009-01-07 13:27 ` Jaswinder Singh Rajput
2009-01-07 23:50 ` Andy Whitcroft
0 siblings, 1 reply; 9+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-07 13:27 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: davej, Ingo Molnar, LKML, Andrew Morton
[-- Attachment #1: Type: text/plain, Size: 853 bytes --]
On Wed, Jan 7, 2009 at 6:37 PM, Andy Whitcroft <apw@canonical.com> wrote:
> On Wed, Jan 07, 2009 at 06:24:55PM +0530, Jaswinder Singh Rajput wrote:
>> 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.
>
./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
[-- Attachment #2: 0007-x86-smp.h-move-boot_cpu_id-declartion-to-cpu.h.patch --]
[-- Type: application/octet-stream, Size: 2521 bytes --]
From 11d39b4d4aea45bd680133577ef662a78f132add Mon Sep 17 00:00:00 2001
From: Jaswinder Singh <jaswinder@ht.satnam>
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
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
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(-)
diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
index 89edafb..f03b23e 100644
--- a/arch/x86/include/asm/cpu.h
+++ b/arch/x86/include/asm/cpu.h
@@ -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 */
diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
index 136f1c7..1963e27 100644
--- a/arch/x86/include/asm/smp.h
+++ b/arch/x86/include/asm/smp.h
@@ -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 */
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 667e5d5..693f3b9 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -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>
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index 1c4a130..109c91d 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -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>
diff --git a/drivers/pci/intr_remapping.c b/drivers/pci/intr_remapping.c
index f78371b..5a57753 100644
--- a/drivers/pci/intr_remapping.c
+++ b/drivers/pci/intr_remapping.c
@@ -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"
--
1.6.0.6
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-07 13:04 ` Ingo Molnar
@ 2009-01-07 13:34 ` Jaswinder Singh Rajput
0 siblings, 0 replies; 9+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-07 13:34 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Andrew Morton, apw, davej, LKML
On Wed, Jan 7, 2009 at 6:34 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Jaswinder Singh Rajput <jaswinderlinux@gmail.com> wrote:
>
>> 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.
>
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-07 13:27 ` Jaswinder Singh Rajput
@ 2009-01-07 23:50 ` Andy Whitcroft
2009-01-08 4:40 ` Jaswinder Singh Rajput
0 siblings, 1 reply; 9+ messages in thread
From: Andy Whitcroft @ 2009-01-07 23:50 UTC (permalink / raw)
To: Jaswinder Singh Rajput; +Cc: davej, Ingo Molnar, LKML, Andrew Morton
On Wed, Jan 07, 2009 at 06:57:04PM +0530, Jaswinder Singh Rajput wrote:
> On Wed, Jan 7, 2009 at 6:37 PM, Andy Whitcroft <apw@canonical.com> wrote:
> > On Wed, Jan 07, 2009 at 06:24:55PM +0530, Jaswinder Singh Rajput wrote:
> >> 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.
> >
>
> ./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
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-07 23:50 ` Andy Whitcroft
@ 2009-01-08 4:40 ` Jaswinder Singh Rajput
2009-01-08 14:54 ` Ingo Molnar
0 siblings, 1 reply; 9+ messages in thread
From: Jaswinder Singh Rajput @ 2009-01-08 4:40 UTC (permalink / raw)
To: Andy Whitcroft; +Cc: davej, Ingo Molnar, LKML, Andrew Morton
On Thu, Jan 8, 2009 at 5:20 AM, Andy Whitcroft <apw@canonical.com> wrote:
>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-08 4:40 ` Jaswinder Singh Rajput
@ 2009-01-08 14:54 ` Ingo Molnar
2009-01-08 16:25 ` Andy Whitcroft
0 siblings, 1 reply; 9+ messages in thread
From: Ingo Molnar @ 2009-01-08 14:54 UTC (permalink / raw)
To: Jaswinder Singh Rajput; +Cc: Andy Whitcroft, davej, LKML, Andrew Morton
* Jaswinder Singh Rajput <jaswinderlinux@gmail.com> wrote:
> On Thu, Jan 8, 2009 at 5:20 AM, Andy Whitcroft <apw@canonical.com> wrote:
> >
> > 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
2009-01-08 14:54 ` Ingo Molnar
@ 2009-01-08 16:25 ` Andy Whitcroft
0 siblings, 0 replies; 9+ messages in thread
From: Andy Whitcroft @ 2009-01-08 16:25 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Jaswinder Singh Rajput, davej, LKML, Andrew Morton
On Thu, Jan 08, 2009 at 03:54:10PM +0100, Ingo Molnar wrote:
>
> * Jaswinder Singh Rajput <jaswinderlinux@gmail.com> wrote:
>
> > On Thu, Jan 8, 2009 at 5:20 AM, Andy Whitcroft <apw@canonical.com> wrote:
> > >
> > > 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?
Sure. Thing. I only have a couple of patches in my queue.
-apw
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-01-08 16:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-07 12:54 scripts/checkpatch.pl : undefined value as an ARRAY reference Jaswinder Singh Rajput
2009-01-07 13:04 ` Ingo Molnar
2009-01-07 13:34 ` Jaswinder Singh Rajput
2009-01-07 13:07 ` Andy Whitcroft
2009-01-07 13:27 ` Jaswinder Singh Rajput
2009-01-07 23:50 ` Andy Whitcroft
2009-01-08 4:40 ` Jaswinder Singh Rajput
2009-01-08 14:54 ` Ingo Molnar
2009-01-08 16:25 ` Andy Whitcroft
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox