From: Joe Perches <joe@perches.com>
To: Colin King <colin.king@canonical.com>,
Amitkumar Karwar <amitkarwar@gmail.com>,
Siva Rebbagondla <siva8118@gmail.com>,
Kalle Valo <kvalo@codeaurora.org>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rsi: make array fsm_state static const, makes object smaller
Date: Fri, 20 Aug 2021 23:38:25 -0700 [thread overview]
Message-ID: <26432fc6c0afbd2a17619bf17c25d77dfbd6ba35.camel@perches.com> (raw)
In-Reply-To: <20210819125018.8577-1-colin.king@canonical.com>
On Thu, 2021-08-19 at 13:50 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the array fsm_state on the stack but instead it
> static const. Makes the object code smaller by 154 bytes:
[]
> diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
[]
> @@ -117,7 +117,7 @@ static int rsi_stats_read(struct seq_file *seq, void *data)
> {
> struct rsi_common *common = seq->private;
>
> - unsigned char fsm_state[][32] = {
> + static const unsigned char fsm_state[][32] = {
why not the even smaller with a defconfig
static const char * const fsm_state[] = {
> "FSM_FW_NOT_LOADED",
> "FSM_CARD_NOT_READY",
> "FSM_COMMON_DEV_PARAMS_SENT",
next prev parent reply other threads:[~2021-08-21 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-19 12:50 [PATCH] rsi: make array fsm_state static const, makes object smaller Colin King
2021-08-21 6:38 ` Joe Perches [this message]
2021-08-29 8:32 ` Kalle Valo
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=26432fc6c0afbd2a17619bf17c25d77dfbd6ba35.camel@perches.com \
--to=joe@perches.com \
--cc=amitkarwar@gmail.com \
--cc=colin.king@canonical.com \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=siva8118@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;
as well as URLs for NNTP newsgroup(s).