[opensuse-kernel] [PATCH] acpi: Fix build when CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS is not defined
From: Larry Finger <Larry.Finger@lwfinger.net> Subject: Fix build when CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS is not defined If CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS is not defined, a build fails with the following warnings/error: CC drivers/acpi/tables.o In file included from include/acpi/acpi.h:63, from include/linux/acpi.h:39, from drivers/acpi/tables.c:33: include/acpi/acpiosxf.h: In function ‘acpi_load_override_tables’: include/acpi/acpiosxf.h:98: warning: no return statement in function returning non-void CC drivers/acpi/blacklist.o In file included from include/acpi/acpi.h:63, from include/linux/acpi.h:39, from drivers/acpi/blacklist.c:33: include/acpi/acpiosxf.h: In function ‘acpi_load_override_tables’: include/acpi/acpiosxf.h:98: warning: no return statement in function returning non-void CC drivers/acpi/osl.o In file included from include/acpi/acpi.h:63, from include/linux/acpi.h:39, from drivers/acpi/osl.c:40: include/acpi/acpiosxf.h: In function ‘acpi_load_override_tables’: include/acpi/acpiosxf.h:98: warning: no return statement in function returning non-void drivers/acpi/osl.c: At top level: drivers/acpi/osl.c:514: error: redefinition of ‘acpi_load_override_tables’ include/acpi/acpiosxf.h:98: note: previous definition of ‘acpi_load_override_tables’ was here Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> --- Index: linux-2.6.32-master/include/acpi/acpiosxf.h =================================================================== --- linux-2.6.32-master.orig/include/acpi/acpiosxf.h +++ linux-2.6.32-master/include/acpi/acpiosxf.h @@ -91,12 +91,8 @@ acpi_status acpi_os_predefined_override(const struct acpi_predefined_names *init_val, acpi_string * new_val); -#ifdef CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS acpi_status acpi_load_override_tables(void); -#else -static inline acpi_status acpi_load_override_tables(void) {} -#endif acpi_status acpi_os_table_override(struct acpi_table_header *existing_table, -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Good catch. I've added your patch to the 11.2 and master repos. Thanks! - -Jeff On 12/15/2009 05:31 PM, Larry Finger wrote:
From: Larry Finger <Larry.Finger@lwfinger.net> Subject: Fix build when CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS is not defined
If CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS is not defined, a build fails with the following warnings/error:
CC drivers/acpi/tables.o In file included from include/acpi/acpi.h:63, from include/linux/acpi.h:39, from drivers/acpi/tables.c:33: include/acpi/acpiosxf.h: In function ‘acpi_load_override_tables’: include/acpi/acpiosxf.h:98: warning: no return statement in function returning non-void CC drivers/acpi/blacklist.o In file included from include/acpi/acpi.h:63, from include/linux/acpi.h:39, from drivers/acpi/blacklist.c:33: include/acpi/acpiosxf.h: In function ‘acpi_load_override_tables’: include/acpi/acpiosxf.h:98: warning: no return statement in function returning non-void CC drivers/acpi/osl.o In file included from include/acpi/acpi.h:63, from include/linux/acpi.h:39, from drivers/acpi/osl.c:40: include/acpi/acpiosxf.h: In function ‘acpi_load_override_tables’: include/acpi/acpiosxf.h:98: warning: no return statement in function returning non-void drivers/acpi/osl.c: At top level: drivers/acpi/osl.c:514: error: redefinition of ‘acpi_load_override_tables’ include/acpi/acpiosxf.h:98: note: previous definition of ‘acpi_load_override_tables’ was here
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> ---
Index: linux-2.6.32-master/include/acpi/acpiosxf.h =================================================================== --- linux-2.6.32-master.orig/include/acpi/acpiosxf.h +++ linux-2.6.32-master/include/acpi/acpiosxf.h @@ -91,12 +91,8 @@ acpi_status acpi_os_predefined_override(const struct acpi_predefined_names *init_val, acpi_string * new_val);
-#ifdef CONFIG_ACPI_CUSTOM_OVERRIDE_INITRAMFS acpi_status acpi_load_override_tables(void); -#else -static inline acpi_status acpi_load_override_tables(void) {} -#endif
acpi_status acpi_os_table_override(struct acpi_table_header *existing_table,
- -- Jeff Mahoney SUSE Labs -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAksoEv4ACgkQLPWxlyuTD7J49ACgpY7Qsiqv9O0OOARvwxQEFbz+ LUEAoIJxloNsqRpYua5i3994N/Tmm60+ =s1XZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (2)
-
Jeff Mahoney
-
Larry Finger