From: Yu-Chun Lin <eleanor15x@gmail.com>
To: Ping-Ke Shih <pkshih@realtek.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: Thu, 25 Sep 2025 12:57:51 +0800 [thread overview]
Message-ID: <aNTLz+SO4AAUeo96@visitorckw-System-Product-Name> (raw)
In-Reply-To: <0990f8ee74574a30a585f2e0e3831837@realtek.com>
On Thu, Sep 25, 2025 at 04:28:40AM +0000, Ping-Ke Shih wrote:
> Yu-Chun Lin <eleanor15x@gmail.com> wrote:
> > On Wed, Sep 24, 2025 at 12:43:56AM +0000, Ping-Ke Shih wrote:
> > > Yu-Chun Lin <eleanor15x@gmail.com> wrote:
> > > > On Mon, Sep 22, 2025 at 05:50:50AM +0000, Ping-Ke Shih wrote:
> > > > > 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.
> > > > >
> > > >
> > > > 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."
> > >
> > > It might rely on LTO (link-time optimization).
> > >
> >
> > I re-tested with 'LTO_CLANG=y', and the code size remains unchanged before
> > and after the patch. I will remove the statement
> > ("may slightly reduce binary size") from the v2 commit message.
> >
>
> What is the .o you checked? Have you also checked size of .ko?
> I guess (sorry I'm not familiar with LTO) that LTO only takes effect
> at least doing partial link.
>
> As the changes of your patch, maybe you can check rtw89_8851b.o or
> rtw89_8851b.ko.
>
I built all related files directly into the kernel, so my measurement was
on the size of the entire vmlinux, not individual .o files or modules.
prev parent reply other threads:[~2025-09-25 4:57 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
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 [this message]
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=aNTLz+SO4AAUeo96@visitorckw-System-Product-Name \
--to=eleanor15x@gmail.com \
--cc=cy.huang@realtek.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=pkshih@realtek.com \
--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