]> git.baikalelectronics.ru Git - kernel.git/commit
media: cxd2820r: make arrays tab static const, makes object smaller
authorColin Ian King <colin.king@canonical.com>
Thu, 5 Sep 2019 17:57:26 +0000 (14:57 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 7 Oct 2019 10:43:14 +0000 (07:43 -0300)
commitebd2544226f137f77c15eaad7c1b1dee153aa3af
tree3d7b8226777a837ff52dacf7ba483d59eebfd640
parent885c2ed9513311a148097fcbfbe497a91810bc46
media: cxd2820r: make arrays tab static const, makes object smaller

Don't populate the array tab on the stack but instead make it
static const. Makes the object size smaller by 170 bytes in total.

Before:
   text    data     bss     dec     hex filename
   7045    1736       0    8781    224d media/dvb-frontends/cxd2820r_c.o
   8800    2216       0   11016    2b08 media/dvb-frontends/cxd2820r_t.o
   8981    2120       0   11101    2b5d media/dvb-frontends/cxd2820r_t2.o

After:
   text    data     bss     dec     hex filename
   6896    1832       0    8728    2218 media/dvb-frontends/cxd2820r_c.o
   8651    2312       0   10963    2ad3 media/dvb-frontends/cxd2820r_t.o
   8853    2184       0   11037    2b1d media/dvb-frontends/cxd2820r_t2.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/dvb-frontends/cxd2820r_c.c
drivers/media/dvb-frontends/cxd2820r_t.c
drivers/media/dvb-frontends/cxd2820r_t2.c