Please silence rear camera driver warnings
I thought i broke something when building imx8-current-librem5 but then it was the camera:
drivers/media/i2c/s5k3l6xx.c: In function ‘s5k5baf_hw_set_cis’:
drivers/media/i2c/s5k3l6xx.c:82:22: warning: unsigned conversion from ‘int’ to ‘u8’ {aka ‘unsigned char’} changes value from ‘53248’ to ‘0’ [-Woverflow]
82 | #define PAGE_IF_HW 0xd000
| ^~~~~~
drivers/media/i2c/s5k3l6xx.c:853:43: note: in expansion of macro ‘PAGE_IF_HW’
853 | s5k5baf_i2c_write(state, REG_CMDWR_PAGE, PAGE_IF_HW);
| ^~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:83:22: warning: unsigned conversion from ‘int’ to ‘u8’ {aka ‘unsigned char’} changes value from ‘28672’ to ‘0’ [-Woverflow]
83 | #define PAGE_IF_SW 0x7000
| ^~~~~~
drivers/media/i2c/s5k3l6xx.c:855:43: note: in expansion of macro ‘PAGE_IF_SW’
855 | s5k5baf_i2c_write(state, REG_CMDWR_PAGE, PAGE_IF_SW);
| ^~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c: In function ‘s5k3l6_hw_set_config’:
drivers/media/i2c/s5k3l6xx.c:1173:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
1173 | const u16 setstream[] = {
| ^~~~~
drivers/media/i2c/s5k3l6xx.c: In function ‘s5k5baf_hw_set_test_pattern’:
drivers/media/i2c/s5k3l6xx.c:1181:46: warning: unsigned conversion from ‘int’ to ‘u8’ {aka ‘unsigned char’} changes value from ‘800’ to ‘32’ [-Woverflow]
1181 | s5k5baf_i2c_write(state, REG_PATTERN_WIDTH, 800);
| ^~~
drivers/media/i2c/s5k3l6xx.c:1182:47: warning: unsigned conversion from ‘int’ to ‘u8’ {aka ‘unsigned char’} changes value from ‘511’ to ‘255’ [-Woverflow]
1182 | s5k5baf_i2c_write(state, REG_PATTERN_HEIGHT, 511);
| ^~~
drivers/media/i2c/s5k3l6xx.c: In function ‘s5k5baf_initialize_ctrls’:
drivers/media/i2c/s5k3l6xx.c:1912:2: warning: "/*" within comment [-Wcomment]
1912 | /* Exposure time: x 1 us *
|
drivers/media/i2c/s5k3l6xx.c:1915:2: warning: "/*" within comment [-Wcomment]
1915 | /* Total gain: 256 <=> 1x *
|
drivers/media/i2c/s5k3l6xx.c: In function ‘s5k5baf_configure_subdevs’:
drivers/media/i2c/s5k3l6xx.c:2189:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
2189 | struct i2c_client *cd = v4l2_get_subdevdata(&state->sd);
| ^~~~~~
drivers/media/i2c/s5k3l6xx.c:2203:1: warning: label ‘err’ defined but not used [-Wunused-label]
2203 | err:
| ^~~
At top level:
drivers/media/i2c/s5k3l6xx.c:2000:13: warning: ‘s5k5baf_unregistered’ defined but not used [-Wunused-function]
2000 | static void s5k5baf_unregistered(struct v4l2_subdev *sd)
| ^~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1983:12: warning: ‘s5k5baf_registered’ defined but not used [-Wunused-function]
1983 | static int s5k5baf_registered(struct v4l2_subdev *sd)
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1680:12: warning: ‘s5k5baf_set_selection’ defined but not used [-Wunused-function]
1680 | static int s5k5baf_set_selection(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1589:12: warning: ‘s5k5baf_get_selection’ defined but not used [-Wunused-function]
1589 | static int s5k5baf_get_selection(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1421:12: warning: ‘s5k5baf_enum_frame_interval’ defined but not used [-Wunused-function]
1421 | static int s5k5baf_enum_frame_interval(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1406:12: warning: ‘s5k5baf_s_frame_interval’ defined but not used [-Wunused-function]
1406 | static int s5k5baf_s_frame_interval(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1369:12: warning: ‘s5k5baf_g_frame_interval’ defined but not used [-Wunused-function]
1369 | static int s5k5baf_g_frame_interval(struct v4l2_subdev *sd,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1268:13: warning: ‘s5k5baf_initialize_data’ defined but not used [-Wunused-function]
1268 | static void s5k5baf_initialize_data(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1179:13: warning: ‘s5k5baf_hw_set_test_pattern’ defined but not used [-Wunused-function]
1179 | static void s5k5baf_hw_set_test_pattern(struct s5k5baf *state, int id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1152:13: warning: ‘s5k5baf_hw_set_config’ defined but not used [-Wunused-function]
1152 | static void s5k5baf_hw_set_config(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:1007:12: warning: ‘s5k3l6_hw_set_video_bus’ defined but not used [-Wunused-function]
1007 | static int s5k3l6_hw_set_video_bus(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:992:12: warning: ‘s5k5baf_hw_set_video_bus’ defined but not used [-Wunused-function]
992 | static int s5k5baf_hw_set_video_bus(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:956:13: warning: ‘s5k5baf_hw_set_colorfx’ defined but not used [-Wunused-function]
956 | static void s5k5baf_hw_set_colorfx(struct s5k5baf *state, int val)
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:944:13: warning: ‘s5k5baf_hw_set_anti_flicker’ defined but not used [-Wunused-function]
944 | static void s5k5baf_hw_set_anti_flicker(struct s5k5baf *state, int v)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:931:13: warning: ‘s5k5baf_hw_set_auto_exposure’ defined but not used [-Wunused-function]
931 | static void s5k5baf_hw_set_auto_exposure(struct s5k5baf *state, int value)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:902:13: warning: ‘s5k5baf_hw_set_awb’ defined but not used [-Wunused-function]
902 | static void s5k5baf_hw_set_awb(struct s5k5baf *state, int awb)
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:871:13: warning: ‘s5k5baf_hw_set_mirror’ defined but not used [-Wunused-function]
871 | static void s5k5baf_hw_set_mirror(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:846:13: warning: ‘s5k5baf_hw_set_cis’ defined but not used [-Wunused-function]
846 | static void s5k5baf_hw_set_cis(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:837:13: warning: ‘s5k5baf_hw_set_ccm’ defined but not used [-Wunused-function]
837 | static void s5k5baf_hw_set_ccm(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:807:13: warning: ‘s5k5baf_hw_set_clocks’ defined but not used [-Wunused-function]
807 | static void s5k5baf_hw_set_clocks(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/s5k3l6xx.c:799:13: warning: ‘s5k5baf_hw_patch’ defined but not used [-Wunused-function]
799 | static void s5k5baf_hw_patch(struct s5k5baf *state)
| ^~~~~~~~~~~~~~~~
Would be coo to have fixed since this makes one miss errors in local builds. @dorota.czaplejewicz since you're on that driver, could you fix that please?