Re: [PATCH] staging: wfx: make a const array static, makes object smaller

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Le 17/10/2020 à 02:11, Joe Perches a écrit :
On Fri, 2020-10-16 at 23:33 +0100, Colin King wrote:
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

Don't populate const array filter_ies on the stack but instead
make it static. Makes the object code smaller by 261 bytes.

Before:
    text	   data	    bss	    dec	    hex	filename
   21674	   3166	    448	  25288	   62c8	drivers/staging/wfx/sta.o

After:
    text	   data	    bss	    dec	    hex	filename
   21349	   3230	    448	  25027	   61c3	drivers/staging/wfx/sta.o

Thanks.

It's odd to me it's so large a change as it's only
24 bytes of initialization. (3 entries, each 8 bytes)


The function looks small.
Maybe it is inlined by gcc in each of the 3 callers?

CJ

This line in the same function:

		hif_set_beacon_filter_table(wvif, 3, filter_ies);

might as well use ARRAY_SIZE(filter_ies) instead of 3




_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux