* [PATCH] ath9k: make const array reg_hole_list static, reduces object code size
@ 2017-09-19 20:40 Colin King
2017-10-04 9:09 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-09-19 20:40 UTC (permalink / raw)
To: QCA ath9k Development, Kalle Valo, linux-wireless, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Don't populate the read-only array reg_hole_list on the stack, instead make
it static. Makes the object code smaller by over 200 bytes:
Before:
text data bss dec hex filename
57518 15248 0 72766 11c3e debug.o
After:
text data bss dec hex filename
57218 15344 0 72562 11b72 debug.o
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/ath/ath9k/debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 01fa30117288..5a0a05abd51a 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -916,7 +916,7 @@ static int open_file_regdump(struct inode *inode, struct file *file)
u8 *buf;
int i, j = 0;
unsigned long num_regs, regdump_len, max_reg_offset;
- const struct reg_hole {
+ static const struct reg_hole {
u32 start;
u32 end;
} reg_hole_list[] = {
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: ath9k: make const array reg_hole_list static, reduces object code size
2017-09-19 20:40 [PATCH] ath9k: make const array reg_hole_list static, reduces object code size Colin King
@ 2017-10-04 9:09 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2017-10-04 9:09 UTC (permalink / raw)
To: Colin Ian King
Cc: QCA ath9k Development, Kalle Valo, linux-wireless, netdev,
kernel-janitors, linux-kernel
Colin Ian King <colin.king@canonical.com> wrote:
> Don't populate the read-only array reg_hole_list on the stack, instead make
> it static. Makes the object code smaller by over 200 bytes:
>
> Before:
> text data bss dec hex filename
> 57518 15248 0 72766 11c3e debug.o
>
> After:
> text data bss dec hex filename
> 57218 15344 0 72562 11b72 debug.o
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Patch applied to ath-next branch of ath.git, thanks.
eba0f28473b2 ath9k: make const array reg_hole_list static, reduces object code size
--
https://patchwork.kernel.org/patch/9960183/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-04 9:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-19 20:40 [PATCH] ath9k: make const array reg_hole_list static, reduces object code size Colin King
2017-10-04 9:09 ` 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).