Thread (3 messages) flat view 3 messages, 3 authors, 2021-08-29
STALE1835d LANDED

Landed in mainline as f4c813641897 on 2021-08-29.

[PATCH] rsi: make array fsm_state static const, makes object smaller

From: Colin King <hidden>
Date: 2021-08-19 12:50:25
Also in: kernel-janitors, lkml, netdev
Subsystem: redpine wireless driver, the rest · Maintainer: Linus Torvalds

From: Colin Ian King <redacted>

Don't populate the array fsm_state on the stack but instead it
static const. Makes the object code smaller by 154 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
   9213	   3904	      0	  13117	   333d	.../wireless/rsi/rsi_91x_debugfs.o

After:
   text	   data	    bss	    dec	    hex	filename
   8995	   3968	      0	  12963	   32a3	.../wireless/rsi/rsi_91x_debugfs.o

(gcc version 10.3.0)

Signed-off-by: Colin Ian King <redacted>
---
 drivers/net/wireless/rsi/rsi_91x_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_debugfs.c b/drivers/net/wireless/rsi/rsi_91x_debugfs.c
index 24a417ea2ae7..f404ca4c38e8 100644
--- 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] = {
 		"FSM_FW_NOT_LOADED",
 		"FSM_CARD_NOT_READY",
 		"FSM_COMMON_DEV_PARAMS_SENT",
-- 
2.32.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help