lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aNLDga29Wp1nwhem@visitorckw-System-Product-Name>
Date: Tue, 23 Sep 2025 23:57:53 +0800
From: Yu-Chun Lin <eleanor15x@...il.com>
To: Ping-Ke Shih <pkshih@...ltek.com>
Cc: "linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	CY_Huang[黃鉦晏] <cy.huang@...ltek.com>,
	Stanley Chang[昌育德] <stanley_chang@...ltek.com>,
	"jserv@...s.ncku.edu.tw" <jserv@...s.ncku.edu.tw>,
	"visitorckw@...il.com" <visitorckw@...il.com>
Subject: Re: [PATCH rtw-next] wifi: rtw89: Replace hardcoded strings with
 helper functions

On Mon, Sep 22, 2025 at 05:50:50AM +0000, Ping-Ke Shih wrote:
> Yu-Chun Lin <eleanor15x@...il.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.
> 

I tested the patch and did not observe any measurable change in the binary size.
The commit message was refers to the description in string-choice.h:

"3) Deduping by the linker, which results in a smaller binary file."

> > 
> > Signed-off-by: Yu-Chun Lin <eleanor15x@...il.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.
> 

Got it, I will drop the include from all files in v2. Thanks.

> Otherwise looks good to me.
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ