From: Ping-Ke Shih <pkshih@realtek.com>
To: Yu-Chun Lin <eleanor15x@gmail.com>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"CY_Huang[黃鉦晏]" <cy.huang@realtek.com>,
"Stanley Chang[昌育德]" <stanley_chang@realtek.com>,
"jserv@ccns.ncku.edu.tw" <jserv@ccns.ncku.edu.tw>,
"visitorckw@gmail.com" <visitorckw@gmail.com>
Subject: RE: [PATCH rtw-next] wifi: rtw89: Replace hardcoded strings with helper functions
Date: Mon, 22 Sep 2025 05:50:50 +0000 [thread overview]
Message-ID: <715313b943d84cfeb3a337dc20be5f6a@realtek.com> (raw)
In-Reply-To: <20250921154410.1202074-1-eleanor15x@gmail.com>
Yu-Chun Lin <eleanor15x@gmail.com> wrote:
> Replace hardcoded strings with 'str_on_off()', 'str_enable_disable()',
> and 'str_read_write()'.
>
> The change improves readability and enables potential string deduplication
> by the linker, which may slightly reduce binary size.
Have you measured the change of binary size? Maybe you can share the result
here.
>
> Signed-off-by: Yu-Chun Lin <eleanor15x@gmail.com>
> ---
> drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c | 10 ++++++----
> drivers/net/wireless/realtek/rtw89/rtw8852a_rfk.c | 10 ++++++----
> drivers/net/wireless/realtek/rtw89/rtw8852b_rfk.c | 8 +++++---
> drivers/net/wireless/realtek/rtw89/rtw8852c_rfk.c | 11 ++++++-----
> drivers/net/wireless/realtek/rtw89/usb.c | 3 ++-
> drivers/net/wireless/realtek/rtw89/wow.c | 5 ++++-
> 6 files changed, 29 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
> b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
> index 84c46d2f4d85..000753061e38 100644
> --- a/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
> +++ b/drivers/net/wireless/realtek/rtw89/rtw8851b_rfk.c
> @@ -2,6 +2,8 @@
> /* Copyright(c) 2022-2023 Realtek Corporation
> */
>
> +#include <linux/string_choices.h>
> +
Driver has included this implicitly, so don't need to include it across
whole patch.
Otherwise looks good to me.
next prev parent reply other threads:[~2025-09-22 5:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-21 15:44 [PATCH rtw-next] wifi: rtw89: Replace hardcoded strings with helper functions Yu-Chun Lin
2025-09-22 5:50 ` Ping-Ke Shih [this message]
2025-09-23 15:57 ` Yu-Chun Lin
2025-09-24 0:43 ` Ping-Ke Shih
2025-09-25 3:59 ` Yu-Chun Lin
2025-09-25 4:28 ` Ping-Ke Shih
2025-09-25 4:57 ` Yu-Chun Lin
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=715313b943d84cfeb3a337dc20be5f6a@realtek.com \
--to=pkshih@realtek.com \
--cc=cy.huang@realtek.com \
--cc=eleanor15x@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stanley_chang@realtek.com \
--cc=visitorckw@gmail.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