[PATCH ath-next] wifi: ath12k: use str_enable_disable() in mac.c

Jeff Johnson jeff.johnson at oss.qualcomm.com
Wed Nov 11 08:22:06 PST 2026


"make coccicheck M=drivers/net/wireless/ath/ath12k" reports:

./mac.c:4556:21-27: opportunity for str_enable_disable(psmode)

Update ath12k_mac_vif_setup_ps() to use the str_enable_disable() helper.

Compile tested only.

Reported-by: kernel test robot <lkp at intel.com>
Reported-by: Julia Lawall <julia.lawall at inria.fr>
Closes: https://lore.kernel.org/r/202411011943.yYxnp7QA-lkp@intel.com/
Signed-off-by: Jeff Johnson <jeff.johnson at oss.qualcomm.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 4f16c78b52a8..b37ec64cb639 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -7,6 +7,7 @@
 #include <net/mac80211.h>
 #include <net/cfg80211.h>
 #include <linux/etherdevice.h>
+#include <linux/string_choices.h>
 
 #include "mac.h"
 #include "core.h"
@@ -4553,7 +4554,7 @@ static void ath12k_mac_vif_setup_ps(struct ath12k_link_vif *arvif)
 	}
 
 	ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac vdev %d psmode %s\n",
-		   arvif->vdev_id, psmode ? "enable" : "disable");
+		   arvif->vdev_id, str_enable_disable(psmode));
 
 	ret = ath12k_wmi_pdev_set_ps_mode(ar, arvif->vdev_id, psmode);
 	if (ret)

---
base-commit: e3485cc885b81314c814a43db2255b1f9100928f
change-id: 20261110-ath12k-coccicheck-mac-b5a890df86c4




More information about the ath12k mailing list