From: "Jaswinder Singh Rajput" <jaswinderlinux@gmail.com>
To: "Andy Whitcroft" <apw@canonical.com>
Cc: davej@redhat.com, "Ingo Molnar" <mingo@elte.hu>,
LKML <linux-kernel@vger.kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: scripts/checkpatch.pl : undefined value as an ARRAY reference
Date: Wed, 7 Jan 2009 18:57:04 +0530 [thread overview]
Message-ID: <3f9a31f40901070527y31fcccc9n5b3d52faa58e359e@mail.gmail.com> (raw)
In-Reply-To: <20090107130742.GD2520@shadowen.org>
[-- 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
next prev parent reply other threads:[~2009-01-07 13:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 12:54 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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3f9a31f40901070527y31fcccc9n5b3d52faa58e359e@mail.gmail.com \
--to=jaswinderlinux@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®