From: Panagiotis Petrakopoulos <npetrakopoulos2003@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.com>
Cc: linux-wireless@vger.kernel.org,
Panagiotis Petrakopoulos <npetrakopoulos2003@gmail.com>
Subject: [PATCH rtw-next] wifi: rtw89: use str_enable_disable() helper
Date: Sat, 13 Jun 2026 01:30:12 +0300 [thread overview]
Message-ID: <20260612223012.504886-1-npetrakopoulos2003@gmail.com> (raw)
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 <npetrakopoulos2003@gmail.com>
---
drivers/net/wireless/realtek/rtw89/core.c | 3 ++-
drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/core.c b/drivers/net/wireless/realtek/rtw89/core.c
index 68dad6090f87..71b7a1bba6ea 100644
--- a/drivers/net/wireless/realtek/rtw89/core.c
+++ b/drivers/net/wireless/realtek/rtw89/core.c
@@ -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);
diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
index e574a9950a3b..6aecef51c066 100644
--- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
+++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
@@ -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
--
2.54.0
reply other threads:[~2026-06-12 22:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260612223012.504886-1-npetrakopoulos2003@gmail.com \
--to=npetrakopoulos2003@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox