Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: drxd: make const arrays slowIncrDecLUT and fastIncrDecLUT static

Don't populate arrays slowIncrDecLUT and fastIncrDecLUT on the stack but
instead make them static. Makes the object code smaller by over 100 bytes:

text data bss dec hex filename
27776 832 64 28672 7000 drxd_hard.o

text data bss dec hex filename
27530 976 64 28570 6f9a drxd_hard.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Colin Ian King and committed by
Mauro Carvalho Chehab
7f033708 bd2355b8

+4 -2
+4 -2
drivers/media/dvb-frontends/drxd_hard.c
··· 638 638 /* == Speed == */ 639 639 { 640 640 const u16 maxRur = 8; 641 - const u16 slowIncrDecLUT[] = { 3, 4, 4, 5, 6 }; 642 - const u16 fastIncrDecLUT[] = { 14, 15, 15, 16, 641 + static const u16 slowIncrDecLUT[] = { 642 + 3, 4, 4, 5, 6 }; 643 + const u16 fastIncrDecLUT[] = { 644 + 14, 15, 15, 16, 643 645 17, 18, 18, 19, 644 646 20, 21, 22, 23, 645 647 24, 26, 27, 28,