Thread (3 messages) 3 messages, 2 authors, 2008-04-12
STALE6628d

[PATCH] sb1000.c: make const arrays static

From: Denys Vlasenko <hidden>
Date: 2008-03-30 23:16:52
Also in: lkml

On Monday 31 March 2008 01:02, Denys Vlasenko wrote:
Size difference for 32bit x86:

   text    data     bss     dec     hex filename
   6299     129       0    6428    191c linux-2.6-ALLYES/drivers/net/sb1000.o
   5418     129       0    5547    15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o

(I also see some other optimization opportunities,
will test and send a patch separately).
Here it is. It replaces automatic constant arrays a-la

    const unsigned char Command0[6] = {0x80, 0x16, 0x00, 0x00, 0x00, 0x00};

with static ones. Size difference for 32bit x86:

   text    data     bss     dec     hex filename
   5418     129       0    5547    15ab linux-2.6.inline-ALLYES/drivers/net/sb1000.o
   5396     129       0    5525    1595 linux-2.6.followup-ALLYES/drivers/net/sb1000.o

Signed-off-by: Denys Vlasenko <redacted>
--
vda

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help