ACPI: suppress compiler warnings
PATCH 1/1 ACPI: suppress compiler warnings
This patch fixes following compiler warnings:
drivers/acpi/csrt.c:135:116: warning: no previous prototype for ‘acpi_csrt_init’ [-Wmissing-prototypes]
drivers/acpi/container.c:183:116: warning: no previous prototype for ‘acpi_container_init’ [-Wmissing-prototypes]
drivers/pci/pcie/portdrv_acpi.c:34:5: warning: no previous prototype for ‘pcie_port_acpi_setup’ [-Wmissing-prototypes]
drivers/acpi/battery.c:149:52: warning: no previous prototype for ‘acpi_battery_present’ [-Wmissing-prototypes]
drivers/acpi/button.c:220:5: warning: no previous prototype for ‘acpi_lid_notifier_register’ [-Wmissing-prototypes] drivers/acpi/button.c:226:5: warning: no previous prototype for ‘acpi_lid_notifier_unregister’ [-Wmissing-prototypes] drivers/acpi/button.c:232:5: warning: no previous prototype for ‘acpi_lid_open’ [-Wmissing-prototypes]
drivers/acpi/processor_throttling.c: In function ‘acpi_processor_throttling_init’:drivers/acpi/processor_throttling.c:216:40: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
--- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 1 + drivers/acpi/container.c | 2 ++ drivers/acpi/csrt.c | 2 ++ drivers/acpi/processor_throttling.c | 3 ++- drivers/pci/pcie/portdrv_acpi.c | 1 + 6 files changed, 9 insertions(+), 2 deletions(-)
drivers/acpi/battery.c +1 -1
@@ -146,7 +146,7 @@ struct acpi_battery {#define to_acpi_battery (x) container_of(x, struct acpi_battery, bat) -inline int acpi_battery_present (struct acpi_battery *battery) +static inline int acpi_battery_present (struct acpi_battery *battery) {return battery->device->status.battery_present; }
drivers/acpi/button.c +1 -0
@@ -33,6 +33,7 @@#include <linux/slab.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> +#include <acpi/button.h> #define PREFIX "ACPI: "
drivers/acpi/container.c +2 -0
@@ -35,6 +35,8 @@#include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> +#include "internal.h" +#define PREFIX "ACPI: "#define _COMPONENT ACPI_CONTAINER_COMPONENT
drivers/acpi/csrt.c +2 -0
@@ -19,6 +19,8 @@#include <linux/platform_device.h> #include <linux/sizes.h> +#include "internal.h" +ACPI_MODULE_NAME ("CSRT" ); static int __init acpi_csrt_parse_shared_info(struct platform_device *pdev,
drivers/acpi/processor_throttling.c +2 -1
@@ -211,9 +211,10 @@ err_ret:*/ void acpi_processor_throttling_init (void ) { -if (acpi_processor_update_tsd_coord ()) +if (acpi_processor_update_tsd_coord ()) {ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Assume no T-state coordination\n" )); + }return ; }
drivers/pci/pcie/portdrv_acpi.c +1 -0
@@ -17,6 +17,7 @@#include "aer/aerdrv.h" #include "../pci.h" +#include "portdrv.h" /** * pcie_port_acpi_setup - Request the BIOS to release control of PCIe services.
Signature · 6 lines
1.8.2.rc0.22.gb3600c3 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Andy Shevchenko
This patch fixes following compiler warnings:
drivers/acpi/csrt.c:135:116: warning: no previous prototype for ‘acpi_csrt_init’ [-Wmissing-prototypes]
drivers/acpi/container.c:183:116: warning: no previous prototype for ‘acpi_container_init’ [-Wmissing-prototypes]
drivers/pci/pcie/portdrv_acpi.c:34:5: warning: no previous prototype for ‘pcie_port_acpi_setup’ [-Wmissing-prototypes]
drivers/acpi/battery.c:149:52: warning: no previous prototype for ‘acpi_battery_present’ [-Wmissing-prototypes]
Quoted 8 lines
drivers/acpi/button.c:220:5: warning: no previous prototype for ‘acpi_lid_notifier_register’ [-Wmissing-prototypes]drivers/acpi/button.c:226:5: warning: no previous prototype for ‘acpi_lid_notifier_unregister’ [-Wmissing-prototypes]drivers/acpi/button.c:232:5: warning: no previous prototype for ‘acpi_lid_open’ [-Wmissing-prototypes]
drivers/acpi/processor_throttling.c: In function ‘acpi_processor_throttling_init’:drivers/acpi/processor_throttling.c:216:40: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]Signed-off-by Andy Shevchenko <[email protected]>
Please split this into separate per-file patches.
Also it would be good to know what config options are triggering the warnings in each case.
Thanks,
Rafael
Quoted 89 lines
--- drivers/acpi/battery.c | 2 +- drivers/acpi/button.c | 1 + drivers/acpi/container.c | 2 ++ drivers/acpi/csrt.c | 2 ++ drivers/acpi/processor_throttling.c | 3 ++- drivers/pci/pcie/portdrv_acpi.c | 1 + 6 files changed, 9 insertions(+), 2 deletions(-)drivers/acpi/battery.c +1
-1@@ -146,7 +146,7 @@ struct acpi_battery {#define to_acpi_battery (x) container_of(x, struct acpi_battery, bat) -inline int acpi_battery_present (struct acpi_battery *battery) +static inline int acpi_battery_present (struct acpi_battery *battery) {return battery->device->status.battery_present; }drivers/acpi/button.c +1
-0@@ -33,6 +33,7 @@#include <linux/slab.h> #include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> +#include <acpi/button.h> #define PREFIX "ACPI: "drivers/acpi/container.c +2
-0@@ -35,6 +35,8 @@#include <acpi/acpi_bus.h> #include <acpi/acpi_drivers.h> +#include "internal.h" +#define PREFIX "ACPI: "#define _COMPONENT ACPI_CONTAINER_COMPONENTdrivers/acpi/csrt.c +2
-0@@ -19,6 +19,8 @@#include <linux/platform_device.h> #include <linux/sizes.h> +#include "internal.h" +ACPI_MODULE_NAME ("CSRT" ); static int __init acpi_csrt_parse_shared_info(struct platform_device *pdev,drivers/acpi/processor_throttling.c +2
-1@@ -211,9 +211,10 @@ err_ret:*/ void acpi_processor_throttling_init (void ) { -if (acpi_processor_update_tsd_coord ()) +if (acpi_processor_update_tsd_coord ()) {ACPI_DEBUG_PRINT ((ACPI_DB_INFO ,"Assume no T-state coordination\n" )); + }return ; }drivers/pci/pcie/portdrv_acpi.c +1
-0@@ -17,6 +17,7 @@#include "aer/aerdrv.h" #include "../pci.h" +#include "portdrv.h" /** * pcie_port_acpi_setup - Request the BIOS to release control of PCIe services.
Signature · 6 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · Rafael J. Wysocki
Quoted 14 lines · Andy Shevchenko
This patch fixes following compiler warnings:
drivers/acpi/csrt.c:135:116: warning: no previous prototype for ‘acpi_csrt_init’ [-Wmissing-prototypes]
drivers/acpi/container.c:183:116: warning: no previous prototype for ‘acpi_container_init’ [-Wmissing-prototypes]
drivers/pci/pcie/portdrv_acpi.c:34:5: warning: no previous prototype for ‘pcie_port_acpi_setup’ [-Wmissing-prototypes]
drivers/acpi/battery.c:149:52: warning: no previous prototype for ‘acpi_battery_present’ [-Wmissing-prototypes]
drivers/acpi/button.c:220:5: warning: no previous prototype for ‘acpi_lid_notifier_register’ [-Wmissing-prototypes]drivers/acpi/button.c:226:5: warning: no previous prototype for ‘acpi_lid_notifier_unregister’ [-Wmissing-prototypes]drivers/acpi/button.c:232:5: warning: no previous prototype for ‘acpi_lid_open’ [-Wmissing-prototypes]
Quoted 6 lines
Quoted 4 lines
drivers/acpi/processor_throttling.c: In function ‘acpi_processor_throttling_init’:drivers/acpi/processor_throttling.c:216:40: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]Signed-off-by Andy Shevchenko <[email protected]>Please split this into separate per-file patches.
Done.
Quoted 2 lines
Also it would be good to know what config options are triggering the warnings in each case.
You mean 'compiler option', do you?
Anyway, please, review patch v2 series.
Signature · 6 lines
Andy Shevchenko <[email protected]> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html