[PATCH] acpi: eliminate section mismatch warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix the linker warning (noise) from section mismatch in ACPI caused
because the function acpi_processor_power_init's references can't be
evaluated at compile time. It uses "first_run" flag and therefore
changes behaviour after first use, and compiler/linker can't see that.

This does cost slightly more dead data.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxx>

--- test-2.6.orig/drivers/acpi/processor_idle.c
+++ test-2.6/drivers/acpi/processor_idle.c
@@ -94,9 +94,11 @@ static int set_max_cstate(struct dmi_sys
 	return 0;
 }
 
-/* Actually this shouldn't be __cpuinitdata, would be better to fix the
-   callers to only run once -AK */
-static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
+/* This used to be __cpuinitdata but then linker would complain about
+   section mismatch because of the first_run flag;
+   would be better to fix thecallers to only run once
+ */
+static struct dmi_system_id processor_power_dmi_table[] = {
 	{ set_max_cstate, "IBM ThinkPad R40e", {
 	  DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
 	  DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1},
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux