wifi: rtw89: use str_enable_disable() helper
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.
Signed-off-by Panagiotis Petrakopoulos <[email protected]>
--- 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
@@ -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
@@ -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
Ping-Ke Shih
maintainerQuoted 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 inrtw89_core_rfkill_poll()and the DPK on/off log in_dpk_onoff().No functional change intended.
Signed-off-by Panagiotis Petrakopoulos <[email protected]>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
2c0810030cf8 wifi: rtw89: use str_enable_disable() helper