All of lore.kernel.org
 help / color / mirror / Atom feed
* [chrome-os:chromeos-5.4 22/23] drivers/media/i2c/imx208.c:866:6: warning: variable 'exposure_max' set but not used
@ 2021-06-18  1:06 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-06-18  1:06 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 5094 bytes --]

tree:   https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-5.4
head:   396a3bd4c4f1c21fe4ee56146a2c97da7887b99c
commit: 0b22113dab8defd916f1cd9b5f006c850b9017b6 [22/23] FROMLIST: BACKPORT: media: imx208: Add imx208 camera sensor driver
config: ia64-randconfig-r024-20210617 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git remote add chrome-os https://chromium.googlesource.com/chromiumos/third_party/kernel
        git fetch --no-tags chrome-os chromeos-5.4
        git checkout 0b22113dab8defd916f1cd9b5f006c850b9017b6
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/media/i2c/imx208.c: In function 'imx208_init_controls':
>> drivers/media/i2c/imx208.c:866:6: warning: variable 'exposure_max' set but not used [-Wunused-but-set-variable]
     866 |  s64 exposure_max;
         |      ^~~~~~~~~~~~


vim +/exposure_max +866 drivers/media/i2c/imx208.c

   860	
   861	/* Initialize control handlers */
   862	static int imx208_init_controls(struct imx208 *imx208)
   863	{
   864		struct i2c_client *client = v4l2_get_subdevdata(&imx208->sd);
   865		struct v4l2_ctrl_handler *ctrl_hdlr = &imx208->ctrl_handler;
 > 866		s64 exposure_max;
   867		s64 vblank_def;
   868		s64 vblank_min;
   869		s64 pixel_rate_min;
   870		s64 pixel_rate_max;
   871		int ret;
   872	
   873		ret = v4l2_ctrl_handler_init(ctrl_hdlr, 8);
   874		if (ret)
   875			return ret;
   876	
   877		mutex_init(&imx208->imx208_mx);
   878		ctrl_hdlr->lock = &imx208->imx208_mx;
   879		imx208->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr,
   880					&imx208_ctrl_ops,
   881					V4L2_CID_LINK_FREQ,
   882					ARRAY_SIZE(link_freq_menu_items) - 1,
   883					0, link_freq_menu_items);
   884	
   885		if (imx208->link_freq)
   886			imx208->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
   887	
   888		pixel_rate_max = link_freq_to_pixel_rate(link_freq_menu_items[0]);
   889		pixel_rate_min = link_freq_to_pixel_rate(
   890				 link_freq_menu_items[ARRAY_SIZE(
   891				 link_freq_menu_items) - 1]);
   892		/* By default, PIXEL_RATE is read only */
   893		imx208->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops,
   894						V4L2_CID_PIXEL_RATE,
   895						pixel_rate_min, pixel_rate_max,
   896						1, pixel_rate_max);
   897	
   898		vblank_def = imx208->cur_mode->vts_def - imx208->cur_mode->height;
   899		vblank_min = imx208->cur_mode->vts_min - imx208->cur_mode->height;
   900		imx208->vblank = v4l2_ctrl_new_std(
   901					ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_VBLANK,
   902					vblank_min,
   903					IMX208_VTS_MAX - imx208->cur_mode->height, 1,
   904					vblank_def);
   905	
   906		imx208->hblank = v4l2_ctrl_new_std(
   907					ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_HBLANK,
   908					IMX208_PPL_384MHZ - imx208->cur_mode->width,
   909					IMX208_PPL_384MHZ - imx208->cur_mode->width,
   910					1,
   911					IMX208_PPL_384MHZ - imx208->cur_mode->width);
   912	
   913		if (imx208->hblank)
   914			imx208->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
   915	
   916		exposure_max = imx208->cur_mode->vts_def - 8;
   917		v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_EXPOSURE,
   918				  IMX208_EXPOSURE_MIN, IMX208_EXPOSURE_MAX,
   919				  IMX208_EXPOSURE_STEP, IMX208_EXPOSURE_DEFAULT);
   920	
   921		imx208->hflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops,
   922						  V4L2_CID_HFLIP, 0, 1, 1, 0);
   923		imx208->vflip = v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops,
   924						  V4L2_CID_VFLIP, 0, 1, 1, 0);
   925	
   926		v4l2_ctrl_new_std(ctrl_hdlr, &imx208_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
   927				  IMX208_ANA_GAIN_MIN, IMX208_ANA_GAIN_MAX,
   928				  IMX208_ANA_GAIN_STEP, IMX208_ANA_GAIN_DEFAULT);
   929	
   930		v4l2_ctrl_new_custom(ctrl_hdlr, &imx208_digital_gain_control, NULL);
   931	
   932		v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &imx208_ctrl_ops,
   933					     V4L2_CID_TEST_PATTERN,
   934					     ARRAY_SIZE(imx208_test_pattern_menu) - 1,
   935					     0, 0, imx208_test_pattern_menu);
   936	
   937		if (ctrl_hdlr->error) {
   938			ret = ctrl_hdlr->error;
   939			dev_err(&client->dev, "%s control init failed (%d)\n",
   940				__func__, ret);
   941			goto error;
   942		}
   943	
   944		imx208->sd.ctrl_handler = ctrl_hdlr;
   945	
   946		return 0;
   947	
   948	error:
   949		v4l2_ctrl_handler_free(ctrl_hdlr);
   950		mutex_destroy(&imx208->imx208_mx);
   951	
   952		return ret;
   953	}
   954	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26607 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-18  1:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-18  1:06 [chrome-os:chromeos-5.4 22/23] drivers/media/i2c/imx208.c:866:6: warning: variable 'exposure_max' set but not used kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.