Skip to content

Commit fb25954

Browse files
Colin Ian Kingmchehab
authored andcommitted
media: atomisp: make const arrays static, makes object smaller
Don't populate const arrays on the stack but instead make them static. Makes the object code smaller by 150 bytes. Before: text data bss dec hex filename 111083 23692 64 134839 20eb7 atomisp/pci/atomisp_compat_css20.o After: text data bss dec hex filename 110773 23852 64 134689 20e21 atomisp/pci/atomisp_compat_css20.o After: (gcc version 9.3.0, amd64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 3a07446 commit fb25954

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/staging/media/atomisp/pci/atomisp_compat_css20.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,13 +2414,13 @@ static void __configure_preview_pp_input(struct atomisp_sub_device *asd,
24142414
struct ia_css_resolution *effective_res =
24152415
&stream_config->input_config.effective_res;
24162416

2417-
const struct bayer_ds_factor bds_fct[] = {{2, 1}, {3, 2}, {5, 4} };
2417+
static const struct bayer_ds_factor bds_fct[] = {{2, 1}, {3, 2}, {5, 4} };
24182418
/*
24192419
* BZ201033: YUV decimation factor of 4 causes couple of rightmost
24202420
* columns to be shaded. Remove this factor to work around the CSS bug.
24212421
* const unsigned int yuv_dec_fct[] = {4, 2};
24222422
*/
2423-
const unsigned int yuv_dec_fct[] = { 2 };
2423+
static const unsigned int yuv_dec_fct[] = { 2 };
24242424
unsigned int i;
24252425

24262426
if (width == 0 && height == 0)
@@ -2540,7 +2540,7 @@ static void __configure_video_pp_input(struct atomisp_sub_device *asd,
25402540
struct ia_css_resolution *effective_res =
25412541
&stream_config->input_config.effective_res;
25422542

2543-
const struct bayer_ds_factor bds_factors[] = {
2543+
static const struct bayer_ds_factor bds_factors[] = {
25442544
{8, 1}, {6, 1}, {4, 1}, {3, 1}, {2, 1}, {3, 2}
25452545
};
25462546
unsigned int i;

0 commit comments

Comments
 (0)