wifi: iwlwifi: Fix warning by adding dependency on DMI
PATCH 1/1 wifi: iwlwifi: Fix warning by adding dependency on DMI
This driver currently assumes CONFIG_DMI is enabled along with ACPI. This may not be true. Due to this, the kernel test bot reports new warning like below for RISC-V allyesconfig builds.
Quoted 1 line
Quoted 1 line
drivers/net/wireless/intel/iwlwifi/fw/acpi.c:1190:25:
warning: '%s' directive argument is null [-Wformat-overflow=]
1190 | "System vendor '%s' is not in the approved list, disabling PPAG.\n",
Fix the warning by adding dependency on CONFIG_DMI.
--- drivers/net/wireless/intel/iwlwifi/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/Kconfig +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-only config IWLWIFI tristate "Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi) " - depends on PCI && HAS_IOMEM && CFG80211 + depends on PCI && HAS_IOMEM && CFG80211 && DMI depends on IWLMEI || !IWLMEI select FW_LOADER help
Signature · 1 line
2.39.2
Quoted 11 lines · Sunil V L
This driver currently assumes
CONFIG_DMIis enabled along with ACPI. This may not be true. Due to this, the kernel test bot reports new warning like below for RISC-V allyesconfig builds.Quoted 1 line
Quoted 1 line
drivers/net/wireless/intel/iwlwifi/fw/acpi.c:1190:25:warning: '%s' directive argument is null [-Wformat-overflow=]
1190 | "System vendor '%s' is not in the approved list, disabling PPAG.\n",
Fix the warning by adding dependency on
CONFIG_DMI.
Not sure that's the right fix - why not put checks in the code there?
Is it just a build warning?
maybe
-dmi_get_system_info(DMI_SYS_VENDOR) +dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>"
johannes
Quoted 20 lines · Johannes Berg
Quoted 11 lines · Sunil V L
This driver currently assumes
CONFIG_DMIis enabled along with ACPI. This may not be true. Due to this, the kernel test bot reports new warning like below for RISC-V allyesconfig builds.Quoted 1 line
Quoted 1 line
drivers/net/wireless/intel/iwlwifi/fw/acpi.c:1190:25:warning: '%s' directive argument is null [-Wformat-overflow=]
1190 | "System vendor '%s' is not in the approved list, disabling PPAG.\n",
Fix the warning by adding dependency on
CONFIG_DMI.Not sure that's the right fix - why not put checks in the code there?
Is it just a build warning?
maybe
Review
Quoted 2 lines
(quoted diff) +1
-1-dmi_get_system_info(DMI_SYS_VENDOR) +dmi_get_system_info(DMI_SYS_VENDOR) ?: "<unknown>"
Thanks!, Johannes. It is a build warning because of allyesconfig build.
Your suggestion works. I will send v2 with this solution.
Thanks,
Sunil