1 From 4ae496b855e158789383247cde55591fe9ce4ceb Mon Sep 17 00:00:00 2001
2 From: Nathan Chancellor <natechancellor@gmail.com>
3 Date: Thu, 27 Sep 2018 17:50:39 -0700
4 Subject: [PATCH 254/725] staging: bcm2835-camera: Avoid unneeded internal
9 drivers/staging/vc04_services/bcm2835-camera/controls.c:59:18: warning:
10 variable 'mains_freq_qmenu' is not needed and will not be emitted
11 [-Wunneeded-internal-declaration]
12 static const s64 mains_freq_qmenu[] = {
16 This is because mains_freq_qmenu is currently only used in an ARRAY_SIZE
17 macro, which is a compile time evaluation in this case. Avoid this by
18 adding mains_freq_qmenu as the imenu member of this structure, which
19 matches all other controls that uses the ARRAY_SIZE macro in v4l2_ctrls.
20 This turns out to be a no-op because V4L2_CID_MPEG_VIDEO_BITRATE_MODE is
21 defined as a MMAL_CONTROL_TYPE_STD_MENU, which does not pass the imenu
22 definition along to v4l2_ctrl_new in bm2835_mmal_init_controls.
24 Link: https://github.com/ClangBuiltLinux/linux/issues/122
25 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 drivers/staging/vc04_services/bcm2835-camera/controls.c | 2 +-
29 1 file changed, 1 insertion(+), 1 deletion(-)
31 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c
32 +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c
33 @@ -1109,7 +1109,7 @@ static const struct bm2835_mmal_v4l2_ctr
35 V4L2_CID_POWER_LINE_FREQUENCY, MMAL_CONTROL_TYPE_STD_MENU,
36 0, ARRAY_SIZE(mains_freq_qmenu) - 1,
38 + 1, 1, mains_freq_qmenu,
39 MMAL_PARAMETER_FLICKER_AVOID,
40 &ctrl_set_flicker_avoidance,