Skip to contentSkip to conversation

Error building drivers/acpi/processor_idle.c in current BK

DISCUSSION Art Haas 2 participants 3 messages Dec 29, 2004 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Art Haas

author
#0 lore raw

Hi.

I tried building Linus's BK tree this morning using the development version of GCC. Unfortunately there was a snag when building some of the acpi files ...

drivers/acpi/processor_idle.c:57: error: static declaration of ‘pm_idle_save’ follows non-static declaration include/acpi/processor.h:180: error: previous declaration of ‘pm_idle_save’ was here

The files compile without problem in GCC 3.3.

Art Haas

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

A message that is not in the archive (sent off-list or not yet received): 1104335566.6187.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#2 lore raw
Quoted 6 lines · Art Haas

Hi.

I tried building Linus's BK tree this morning using the development version of GCC. Unfortunately there was a snag when building some of the acpi files ...

Quoted 6 lines

drivers/acpi/processor_idle.c:57: error: static declaration of ???pm_idle_save??? follows non-static declaration include/acpi/processor.h:180: error: previous declaration of ???pm_idle_save??? was here

The files compile without problem in GCC 3.3.

Thanks for reporting this issue. Could you test the attached patch, please? gcc-Version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7) did and does not complain...

As pm_idle_save is static to processor_idle by now, having it defined differently in processor.h breaks compilation with latest gcc, as noted by Art Haas.

---

 include/acpi/processor.h |    1 -
 1 files changed, 1 deletion(-)
include/acpi/processor.h +0 -1
Index: 2.6.10/include/acpi/processor.h
===================================================================
@@ -177,7 +177,6 @@
 /* for communication between multiple parts of the processor kernel module */
 extern struct acpi_processor	*processors[NR_CPUS];
 extern struct acpi_processor_errata errata;
-extern void (*pm_idle_save)(void);
 
 /* in processor_perflib.c */
 #ifdef CONFIG_CPU_FREQ

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/

A message that is not in the archive (sent off-list or not yet received): 20041229160708.GA8982-X3ehHDuj6sIIGcDfoQAp7BvVK+yQ3ZXh@public.gmane.org

author
#4 lore raw
Quoted 34 lines · Dominik Brodowski
Quoted 6 lines · Art Haas

Hi.

I tried building Linus's BK tree this morning using the development version of GCC. Unfortunately there was a snag when building some of the acpi files ...

Quoted 6 lines

drivers/acpi/processor_idle.c:57: error: static declaration of ???pm_idle_save??? follows non-static declaration include/acpi/processor.h:180: error: previous declaration of ???pm_idle_save??? was here

The files compile without problem in GCC 3.3.

Thanks for reporting this issue. Could you test the attached patch, please? gcc-Version 3.4.3 20041125 (Gentoo Linux 3.4.3-r1, ssp-3.4.3-0, pie-8.7.7) did and does not complain...

As pm_idle_save is static to processor_idle by now, having it defined differently in processor.h breaks compilation with latest gcc, as noted by Art Haas.

---

 include/acpi/processor.h |    1 -
 1 files changed, 1 deletion(-)

Index: 2.6.10/include/acpi/processor.h
===================================================================

include/acpi/processor.h line 182

Quoted 7 lines
include/acpi/processor.h +0 -1
@@ -177,7 +177,6 @@
 /* for communication between multiple parts of the processor kernel module */
 extern struct acpi_processor	*processors[NR_CPUS];
 extern struct acpi_processor_errata errata;
-extern void (*pm_idle_save)(void);
 
 /* in processor_perflib.c */
 #ifdef CONFIG_CPU_FREQ

Removing this line allows processor_idle.c to compile without problems.

Art Haas

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/