* [PATCH] iwlegacy: make array interval static, makes object smaller
@ 2019-10-07 13:41 Colin King
2019-10-09 8:28 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2019-10-07 13:41 UTC (permalink / raw)
To: Stanislaw Gruszka, Kalle Valo, David S . Miller, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the array interval on the stack but instead make it
static. Makes the object code smaller by 121 bytes.
Before:
text data bss dec hex filename
167797 29676 448 197921 30521 wireless/intel/iwlegacy/common.o
After:
text data bss dec hex filename
167580 29772 448 197800 304a8 wireless/intel/iwlegacy/common.o
(gcc version 9.2.1, amd64)
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/intel/iwlegacy/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/intel/iwlegacy/common.c b/drivers/net/wireless/intel/iwlegacy/common.c
index 73f7bbf742bc..e4ea734e58d8 100644
--- a/drivers/net/wireless/intel/iwlegacy/common.c
+++ b/drivers/net/wireless/intel/iwlegacy/common.c
@@ -1072,7 +1072,7 @@ EXPORT_SYMBOL(il_get_channel_info);
static void
il_build_powertable_cmd(struct il_priv *il, struct il_powertable_cmd *cmd)
{
- const __le32 interval[3][IL_POWER_VEC_SIZE] = {
+ static const __le32 interval[3][IL_POWER_VEC_SIZE] = {
SLP_VEC(2, 2, 4, 6, 0xFF),
SLP_VEC(2, 4, 7, 10, 10),
SLP_VEC(4, 7, 10, 10, 0xFF)
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iwlegacy: make array interval static, makes object smaller
2019-10-07 13:41 [PATCH] iwlegacy: make array interval static, makes object smaller Colin King
@ 2019-10-09 8:28 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2019-10-09 8:28 UTC (permalink / raw)
To: Colin King
Cc: Stanislaw Gruszka, David S . Miller, linux-wireless, netdev,
kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Don't populate the array interval on the stack but instead make it
> static. Makes the object code smaller by 121 bytes.
>
> Before:
> text data bss dec hex filename
> 167797 29676 448 197921 30521 wireless/intel/iwlegacy/common.o
>
> After:
> text data bss dec hex filename
> 167580 29772 448 197800 304a8 wireless/intel/iwlegacy/common.o
>
> (gcc version 9.2.1, amd64)
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Patch applied to wireless-drivers-next.git, thanks.
55047fb783e0 iwlegacy: make array interval static, makes object smaller
--
https://patchwork.kernel.org/patch/11177531/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-09 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 13:41 [PATCH] iwlegacy: make array interval static, makes object smaller Colin King
2019-10-09 8:28 ` Kalle Valo
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).