iwlwifi/uefi: remove CONFIG_ACPI check
PATCH 1/1 iwlwifi/uefi: remove CONFIG_ACPI check
This fixes a build failure on ARCH=arm when CONFIG_EFI is set but CONFIG_ACPI is not, because uefi.h declares iwl_uefi_get_sgom_table() and iwl_uefi_get_uats_table() as dummy inline function, but uefi.c contains the real (non-inline) implementation:
drivers/net/wireless/intel/iwlwifi/fw/uefi.c:359:6: error: redefinition of 'iwl_uefi_get_sgom_table'
359 | void iwl_uefi_get_sgom_table(struct iwl_trans *trans,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/wireless/intel/iwlwifi/fw/uefi.c:11:
drivers/net/wireless/intel/iwlwifi/fw/uefi.h:294:6: note: previous definition of 'iwl_uefi_get_sgom_table' with type 'void(struct iwl_trans *, struct iwl_fw_runtime *)'
294 | void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/fw/uefi.c:392:5: error: redefinition of 'iwl_uefi_get_uats_table'
392 | int iwl_uefi_get_uats_table(struct iwl_trans *trans,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/fw/uefi.h:299:5: note: previous definition of 'iwl_uefi_get_uats_table' with type 'int(struct iwl_trans *, struct iwl_fw_runtime *)'
299 | int iwl_uefi_get_uats_table(struct iwl_trans *trans,
| ^~~~~~~~~~~~~~~~~~~~~~~I don't know how the driver works, and I do not know why the CONFIG_ACPI check was added in the first place by commit c593d2fae592a ("iwlwifi: support SAR GEO Offset Mapping override via BIOS"), but since it did not add the same #ifdef to uefi.c, my first guess is that this piece of code shall be used even if ACPI is disabled.
--- drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/fw/uefi.h +1 -1
@@ -285,7 +285,7 @@ static inline int iwl_uefi_get_dsm(struct iwl_fw_runtime *fwrt, }#endif /* CONFIG_EFI */ -#if defined(CONFIG_EFI ) && defined(CONFIG_ACPI ) +#if defined(CONFIG_EFI )void iwl_uefi_get_sgom_table (struct iwl_trans *trans,struct iwl_fw_runtime *fwrt);int iwl_uefi_get_uats_table (struct iwl_trans *trans,struct iwl_fw_runtime *fwrt);
Signature · 1 line
2.39.2
Quoted 29 lines · Max Kellermann
This fixes a build failure on ARCH=arm when
CONFIG_EFIis set butCONFIG_ACPIis not, becauseuefi.hdeclaresiwl_uefi_get_sgom_table()andiwl_uefi_get_uats_table()as dummy inline function, butuefi.ccontains the real (non-inline) implementation:
drivers/net/wireless/intel/iwlwifi/fw/uefi.c:359:6: error: redefinition of 'iwl_uefi_get_sgom_table'
359 | void iwl_uefi_get_sgom_table(structiwl_trans*trans,| ^~~~~~~~~~~~~~~~~~~~~~~In file included from
drivers/net/wireless/intel/iwlwifi/fw/uefi.c:11:
drivers/net/wireless/intel/iwlwifi/fw/uefi.h:294:6: note: previous
definition of 'iwl_uefi_get_sgom_table' with type 'void(structiwl_trans*, structiwl_fw_runtime*)'
294 | voidiwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt)| ^~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/intel/iwlwifi/fw/uefi.c:392:5: error: redefinition of 'iwl_uefi_get_uats_table' 392 | int iwl_uefi_get_uats_table(struct iwl_trans *trans, | ^~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/intel/iwlwifi/fw/uefi.h:299:5: note: previous
definition of 'iwl_uefi_get_uats_table' with type 'int(struct iwl_trans *, struct iwl_fw_runtime *)'
299 | int iwl_uefi_get_uats_table(structiwl_trans*trans,| ^~~~~~~~~~~~~~~~~~~~~~~I don't know how the driver works, and I do not know why the
CONFIG_ACPIcheck was added in the first place by commitc593d2fae592a("iwlwifi: support SAR GEO Offset Mapping override via BIOS"), but since it did not add the same #ifdef touefi.c, my first guess is that this piece of code shall be used even if ACPI is disabled.
Quoted 4 lines
Signed-off-by Max Kellermann <[email protected]>--- drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
"wifi:" missing from title but I'm guessing Johannes can add that.
Signature · 3 lines
https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Korenblit, Miriam Rachel
maintainerQuoted 18 lines
I don't know how the driver works, and I do not know why the
CONFIG_ACPIcheck was added in the first place by commitc593d2fae592a
("iwlwifi: support SAR GEO Offset Mapping override via BIOS"), but since it did not add the same #ifdef touefi.c, my first guess is that this piece of code shall be used even if ACPI is disabled.Signed-off-by Max Kellermann <[email protected]>--- drivers/net/wireless/intel/iwlwifi/fw/uefi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/wireless/intel/iwlwifi/fw/uefi.h +0
-0
drivers/net/wireless/intel/iwlwifi/fw/uefi.h static inline int iwl_uefi_get_dsm(struct iwl_fw_runtime · line 291
Quoted 8 lines
drivers/net/wireless/intel/iwlwifi/fw/uefi.h +1
-2@@ -285,7 +285,7 @@ static inline int iwl_uefi_get_dsm(struct iwl_fw_runtime *fwrt, } #endif /* CONFIG_EFI */ -#if defined(CONFIG_EFI ) && defined(CONFIG_ACPI ) +#if defined(CONFIG_EFI )void iwl_uefi_get_sgom_table (struct iwl_trans *trans,struct iwl_fw_runtime *fwrt);int iwl_uefi_get_uats_table (struct iwl_trans *trans,struct iwl_fw_runtime *fwrt); --
Hi Max,
Thanks for your fix!
I think that I'd prefer Arnd Bergmans fix, looks cleaner to me.
Thanks!
Quoted 1 line
2.39.2