Skip to contentSkip to conversation

wifi: rtw89: use str_enable_disable() helper

PATCH In review Panagiotis Petrakopoulos 2 participants 2 messages Jun 12 – Jul 3 Realtek wireless driver (rtw89)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: rtw89: use str_enable_disable() helper

Replace "enable"/"disable" strings in ternary expressions with the str_enable_disable() helper from <linux/string_choices.h>. This covers the rfkill state log in rtw89_core_rfkill_poll() and the DPK on/off log in _dpk_onoff().

No functional change intended.

---
 drivers/net/wireless/realtek/rtw89/core.c         | 3 ++-
 drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtw89/core.c +2 -1
index 68dad6090f87..71b7a1bba6ea 100644
@@ -3,6 +3,7 @@
  */
 #include <linux/ip.h>
 #include <linux/sort.h>
+#include <linux/string_choices.h>
 #include <linux/udp.h>
 
 #include "cam.h"
@@ -7266,7 +7267,7 @@ void rtw89_core_rfkill_poll(struct rtw89_dev *rtwdev, bool force)
 		return;
 
 	rtw89_info(rtwdev, "rfkill hardware state changed to %s\n",
-		   blocked ? "disable" : "enable");
+		   str_enable_disable(!blocked));
 
 	if (blocked)
 		set_bit(RTW89_FLAG_HW_RFKILL_STATE, rtwdev->flags);
drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c +2 -1
index e574a9950a3b..6aecef51c066 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
 /* Copyright(c) 2022-2023  Realtek Corporation
  */
+#include <linux/string_choices.h>
 
 #include "coex.h"
 #include "debug.h"
@@ -1874,7 +1875,7 @@ static void _dpk_onoff(struct rtw89_dev *rtwdev, enum rtw89_rf_path path,
 			       0xf0000000, val);
 
 	rtw89_debug(rtwdev, RTW89_DBG_RFK, "[DPK] S%d[%d] DPK %s !!!\n", path,
-		    kidx, val == 0 ? "disable" : "enable");
+		    kidx, str_enable_disable(val));
 }
 
 static void _dpk_init(struct rtw89_dev *rtwdev, enum rtw89_rf_path path)

base-commit: 21352612198c83a8441482abbf3bd45e4f128dd0

Signature · 1 line
2.54.0
maintainer
#1 lore raw
Quoted 8 lines · Panagiotis Petrakopoulos

Replace "enable"/"disable" strings in ternary expressions with the str_enable_disable() helper from <linux/string_choices.h>. This covers the rfkill state log in rtw89_core_rfkill_poll() and the DPK on/off log in _dpk_onoff().

No functional change intended.

1 patch(es) applied to rtw-next branch of rtw.git, thanks.

2c0810030cf8 wifi: rtw89: use str_enable_disable() helper

---
https://github.com/pkshih/rtw.git