Skip to contentSkip to conversation

compile error in arch/ia64/kernel/acpi.c

-tip tree Li Zefan 3 participants 4 messages Dec 31, 2008

lore
Share & tools
lore

Li Zefan

author
#0 lore raw

arch/ia64/kernel/acpi.c:205: error: conflicting types for 'total_cpus' include/linux/smp.h:25: error: previous declaration of 'total_cpus' was here

due to [PATCH 3/3] cpumask: add sysfs displays for configured and disabled cpu maps
(http://lkml.org/lkml/2008/12/19/25)

author
#1 lore raw

forgot to CC Tony Luck <[email protected]>

Quoted 6 lines · Li Zefan

arch/ia64/kernel/acpi.c:205: error: conflicting types for 'total_cpus' include/linux/smp.h:25: error: previous declaration of 'total_cpus' was here

due to [PATCH 3/3] cpumask: add sysfs displays for configured and disabled cpu maps
(http://lkml.org/lkml/2008/12/19/25)

Is this a sane fix?

----

From: Li Zefan <[email protected]>
Subject: [PATCH] IA64: fix compile error

Remove static total_cpus in arch/ia64/kernel/acpi.c, use global total_cpus defined in drivers/base/cpu.c.

---
 arch/ia64/kernel/acpi.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
arch/ia64/kernel/acpi.c +0 -1
index 54ae373..0553648 100644
@@ -202,7 +202,6 @@ char *__init __acpi_map_table(unsigned long phys_addr, unsigned long size)
                             Boot-time Table Parsing
    -------------------------------------------------------------------------- */
 
-static int total_cpus __initdata;
 static int available_cpus __initdata;
 struct acpi_table_madt *acpi_madt __initdata;
 static u8 has_8259;
Signature · 1 line
1.5.4.rc3
#2 lore raw
In reply to Li Zefan
Quoted 5 lines · On Wednesday 31 December 2008 19:46:07 Li Zefan wrote:

arch/ia64/kernel/acpi.c:205: error: conflicting types for 'total_cpus' include/linux/smp.h:25: error: previous declaration of 'total_cpus' was here

due to [PATCH 3/3] cpumask: add sysfs displays for configured and disabled cpu maps
(http://lkml.org/lkml/2008/12/19/25)

Hmm, I don't know how this escaped linux-next. But the fix is simple:

Subject: Remove IA64 definition of total_cpus now it's in core code

Impact: fix IA64 compile

Fortunately, they have exactly the same semantics.

arch/ia64/kernel/acpi.c +0 -1
@@ -202,7 +202,6 @@ char *__init __acpi_map_table(unsigned l
                             Boot-time Table Parsing
    -------------------------------------------------------------------------- */
 
-static int total_cpus __initdata;
 static int available_cpus __initdata;
 struct acpi_table_madt *acpi_madt __initdata;
 static u8 has_8259;
#3 lore raw
Quoted 9 lines · Rusty Russell
Quoted 5 lines · On Wednesday 31 December 2008 19:46:07 Li Zefan wrote:

arch/ia64/kernel/acpi.c:205: error: conflicting types for 'total_cpus' include/linux/smp.h:25: error: previous declaration of 'total_cpus' was here

due to [PATCH 3/3] cpumask: add sysfs displays for configured and disabled cpu maps
(http://lkml.org/lkml/2008/12/19/25)

Hmm, I don't know how this escaped linux-next. But the fix is simple:

Hi Rusty,

This was caught in today's linux-next :)

Quoted 6 lines

Subject: Remove IA64 definition of total_cpus now it's in core code

Impact: fix IA64 compile

Fortunately, they have exactly the same semantics.

Quoted 13 lines
arch/ia64/kernel/acpi.c +0 -1
@@ -202,7 +202,6 @@ char *__init __acpi_map_table(unsigned l
                             Boot-time Table Parsing
    -------------------------------------------------------------------------- */
 
-static int total_cpus __initdata;
 static int available_cpus __initdata;
 struct acpi_table_madt *acpi_madt __initdata;
 static u8 has_8259;
Signature · 4 lines
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.