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

media: vpx3220: make array input_vals static, makes object smaller

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

Before:
text data bss dec hex filename
11744 3536 128 15408 3c30 drivers/media/i2c/vpx3220.o

After:
text data bss dec hex filename
11574 3600 128 15302 3bc6 drivers/media/i2c/vpx3220.o

(gcc version 9.2.1, amd64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

authored by

Colin Ian King and committed by
Mauro Carvalho Chehab
9ecb6718 16d6bc53

+1 -1
+1 -1
drivers/media/i2c/vpx3220.c
··· 375 375 input = 1: COMPOSITE input 376 376 input = 2: SVHS input */ 377 377 378 - const int input_vals[3][2] = { 378 + static const int input_vals[3][2] = { 379 379 {0x0c, 0}, 380 380 {0x0d, 0}, 381 381 {0x0e, 1}