diff mbox series

wifi: iwlwifi: mld: Fix build with CONFIG_PM disabled

Message ID 20250401032153.2896424-1-linux@roeck-us.net (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series wifi: iwlwifi: mld: Fix build with CONFIG_PM disabled | expand

Checks

Context Check Description
wifibot/fixes_present success Fixes tag not required for -next series
wifibot/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
wifibot/tree_selection success Guessed tree name to be wireless-next
wifibot/ynl success Generated files up to date; no warnings/errors; no diff in generated;
wifibot/build_32bit success Errors and warnings before: 0 this patch: 0
wifibot/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
wifibot/build_clang success Errors and warnings before: 0 this patch: 0
wifibot/build_clang_rust success No Rust files in patch. Skipping build
wifibot/build_tools success No tools touched, skip
wifibot/check_selftest success No net selftest shell script
wifibot/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
wifibot/deprecated_api success None detected
wifibot/header_inline success No static functions without inline keyword in header files
wifibot/kdoc success Errors and warnings before: 0 this patch: 0
wifibot/source_inline success Was 0 now: 0
wifibot/verify_fixes success Fixes tag looks correct
wifibot/verify_signedoff success Signed-off-by tag matches author and committer

Commit Message

Guenter Roeck April 1, 2025, 3:21 a.m. UTC
If CONFIG_PM is disabled, the CONFIG_PM symbol is not defined.
This results in

drivers/net/wireless/intel/iwlwifi/mld/iface.h:169:5: error:
	"CONFIG_PM_SLEEP" is not defined, evaluates to 0

because the conditional uses #if instead of #ifdef. Using #ifdef
fixes the problem.

Fixes: d1e879ec600f9 ("wifi: iwlwifi: add iwlmld sub-driver")
Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
Maybe this has already been addressed. If so, sorry, I did not find it.
I did not see thos fixed in Arnd's patch addressing the other PM_SLEEP
related issues in the driver.

 drivers/net/wireless/intel/iwlwifi/mld/iface.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Berg April 1, 2025, 6:56 a.m. UTC | #1
On Mon, 2025-03-31 at 20:21 -0700, Guenter Roeck wrote:
> If CONFIG_PM is disabled, the CONFIG_PM symbol is not defined.
> This results in
> 
> drivers/net/wireless/intel/iwlwifi/mld/iface.h:169:5: error:
> 	"CONFIG_PM_SLEEP" is not defined, evaluates to 0
> 
> because the conditional uses #if instead of #ifdef. Using #ifdef
> fixes the problem.
> 
> Fixes: d1e879ec600f9 ("wifi: iwlwifi: add iwlmld sub-driver")
> Cc: Miri Korenblit <miriam.rachel.korenblit@intel.com>
> Cc: Arnd Bergmann <arnd@arndb.de>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
> Maybe this has already been addressed. If so, sorry, I did not find it.
> I did not see thos fixed in Arnd's patch addressing the other PM_SLEEP
> related issues in the driver.
> 

Hadn't, except internally I'd fixed it a while ago, and now Miri sent my
patch (same as yours) 20 minutes later ;-)

Thanks, I'll start getting things into the wireless tree soon.

johannes
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/mld/iface.h b/drivers/net/wireless/intel/iwlwifi/mld/iface.h
index d1d56b081bf6..ec14d0736cee 100644
--- a/drivers/net/wireless/intel/iwlwifi/mld/iface.h
+++ b/drivers/net/wireless/intel/iwlwifi/mld/iface.h
@@ -166,7 +166,7 @@  struct iwl_mld_vif {
 
 	struct iwl_mld_emlsr emlsr;
 
-#if CONFIG_PM_SLEEP
+#ifdef CONFIG_PM_SLEEP
 	struct iwl_mld_wowlan_data wowlan_data;
 #endif
 #ifdef CONFIG_IWLWIFI_DEBUGFS