* [PATCH] wifi: iwlwifi: Fix warning by adding dependency on DMI
@ 2023-11-09 5:40 Sunil V L
2023-11-09 9:09 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Sunil V L @ 2023-11-09 5:40 UTC (permalink / raw)
To: linux-wireless, linux-kernel
Cc: Gregory Greenman, Kalle Valo, Palmer Dabbelt, Conor Dooley,
Andrew Jones, Sunil V L, kernel test robot
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.
>> 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.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311040602.sCjU3UXr-lkp@intel.com/
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
drivers/net/wireless/intel/iwlwifi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlwifi/Kconfig b/drivers/net/wireless/intel/iwlwifi/Kconfig
index 20971304fdef..cbcd1dcced4d 100644
--- a/drivers/net/wireless/intel/iwlwifi/Kconfig
+++ b/drivers/net/wireless/intel/iwlwifi/Kconfig
@@ -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
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: iwlwifi: Fix warning by adding dependency on DMI
2023-11-09 5:40 [PATCH] wifi: iwlwifi: Fix warning by adding dependency on DMI Sunil V L
@ 2023-11-09 9:09 ` Johannes Berg
2023-11-09 15:11 ` Sunil V L
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2023-11-09 9:09 UTC (permalink / raw)
To: Sunil V L, linux-wireless, linux-kernel
Cc: Gregory Greenman, Kalle Valo, Palmer Dabbelt, Conor Dooley,
Andrew Jones, kernel test robot
On Thu, 2023-11-09 at 11:10 +0530, Sunil V L wrote:
> 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.
>
> > > 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] wifi: iwlwifi: Fix warning by adding dependency on DMI
2023-11-09 9:09 ` Johannes Berg
@ 2023-11-09 15:11 ` Sunil V L
0 siblings, 0 replies; 3+ messages in thread
From: Sunil V L @ 2023-11-09 15:11 UTC (permalink / raw)
To: Johannes Berg
Cc: linux-wireless, linux-kernel, Gregory Greenman, Kalle Valo,
Palmer Dabbelt, Conor Dooley, Andrew Jones, kernel test robot
On Thu, Nov 09, 2023 at 10:09:53AM +0100, Johannes Berg wrote:
> On Thu, 2023-11-09 at 11:10 +0530, Sunil V L wrote:
> > 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.
> >
> > > > 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>"
>
Thanks!, Johannes. It is a build warning because of allyesconfig build.
Your suggestion works. I will send v2 with this solution.
Thanks,
Sunil
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-09 15:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 5:40 [PATCH] wifi: iwlwifi: Fix warning by adding dependency on DMI Sunil V L
2023-11-09 9:09 ` Johannes Berg
2023-11-09 15:11 ` Sunil V L
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).