public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Serin Yeh <serin.yeh@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	" Дамјан Георгиевски " <gdamjan@gmail.com>
Subject: [gdamjan:v7.0/imx471 3/4] drivers/media/i2c/imx471.c:932:15: warning: variable 'props' is uninitialized when passed as a const pointer argument here
Date: Tue, 21 Apr 2026 22:05:21 +0800	[thread overview]
Message-ID: <202604212217.fsrKOa3z-lkp@intel.com> (raw)

tree:   https://github.com/gdamjan/linux v7.0/imx471
head:   c1b8b7df1d7235afa9bf2b853fd95e41c0b57c54
commit: 66194d8e654533d19df9c4ab8cc17336d32b9808 [3/4] Add IMX471 mirror/flip functions for fitting camera module's orientation In order to meet Sony's init table and flip function, also modify registers as a better settings.
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260421/202604212217.fsrKOa3z-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260421/202604212217.fsrKOa3z-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604212217.fsrKOa3z-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/media/i2c/imx471.c:932:15: warning: variable 'props' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]
     932 |                                                               &props);
         |                                                                ^~~~~
   1 warning generated.


vim +/props +932 drivers/media/i2c/imx471.c

   842	
   843	/* Initialize control handlers */
   844	static int imx471_init_controls(struct imx471 *imx471)
   845	{
   846		struct i2c_client *client = v4l2_get_subdevdata(&imx471->sd);
   847		struct v4l2_ctrl_handler *ctrl_hdlr;
   848		struct v4l2_fwnode_device_properties props;
   849	
   850		s64 exposure_max;
   851		s64 vblank_def;
   852		s64 vblank_min;
   853		s64 hblank;
   854		u64 pixel_rate;
   855		const struct imx471_mode *mode;
   856		u32 max;
   857		int ret;
   858	
   859		ctrl_hdlr = &imx471->ctrl_handler;
   860		ret = v4l2_ctrl_handler_init(ctrl_hdlr, 10);
   861		if (ret)
   862			return ret;
   863	
   864		mutex_init(&imx471->mutex);
   865		ctrl_hdlr->lock = &imx471->mutex;
   866		max = ARRAY_SIZE(link_freq_menu_items) - 1;
   867		imx471->link_freq = v4l2_ctrl_new_int_menu(ctrl_hdlr, &imx471_ctrl_ops,
   868							   V4L2_CID_LINK_FREQ, max, 0,
   869							   link_freq_menu_items);
   870		if (imx471->link_freq)
   871			imx471->link_freq->flags |= V4L2_CTRL_FLAG_READ_ONLY;
   872	
   873		/* pixel_rate = link_freq * 2 * nr_of_lanes / bits_per_sample */
   874		pixel_rate = IMX471_LINK_FREQ_DEFAULT * 2 * 4;
   875		do_div(pixel_rate, 10);
   876		/* By default, PIXEL_RATE is read only */
   877		imx471->pixel_rate = v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops,
   878						       V4L2_CID_PIXEL_RATE, pixel_rate,
   879						       pixel_rate, 1, pixel_rate);
   880	
   881		/* Initial vblank/hblank/exposure parameters based on current mode */
   882		mode = imx471->cur_mode;
   883		vblank_def = mode->fll_def - mode->height;
   884		vblank_min = mode->fll_min - mode->height;
   885		imx471->vblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops,
   886						   V4L2_CID_VBLANK, vblank_min,
   887						   IMX471_FLL_MAX - mode->height,
   888						   1, vblank_def);
   889	
   890		hblank = mode->llp - mode->width;
   891		imx471->hblank = v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops,
   892						   V4L2_CID_HBLANK, hblank, hblank,
   893						   1, hblank);
   894		if (imx471->hblank)
   895			imx471->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
   896	
   897		/* fll >= exposure time + adjust parameter (default value is 18) */
   898		exposure_max = mode->fll_def - 18;
   899		imx471->exposure = v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops,
   900						     V4L2_CID_EXPOSURE,
   901						     IMX471_EXPOSURE_MIN, exposure_max,
   902						     IMX471_EXPOSURE_STEP,
   903						     IMX471_EXPOSURE_DEFAULT);
   904	
   905		v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops, V4L2_CID_ANALOGUE_GAIN,
   906				  IMX471_ANA_GAIN_MIN, IMX471_ANA_GAIN_MAX,
   907				  IMX471_ANA_GAIN_STEP, IMX471_ANA_GAIN_DEFAULT);
   908	
   909		/* Digital gain */
   910		v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops, V4L2_CID_DIGITAL_GAIN,
   911				  IMX471_DGTL_GAIN_MIN, IMX471_DGTL_GAIN_MAX,
   912				  IMX471_DGTL_GAIN_STEP, IMX471_DGTL_GAIN_DEFAULT);
   913	
   914		v4l2_ctrl_new_std_menu_items(ctrl_hdlr, &imx471_ctrl_ops,
   915					     V4L2_CID_TEST_PATTERN,
   916					     ARRAY_SIZE(imx471_test_pattern_menu) - 1,
   917					     0, 0, imx471_test_pattern_menu);
   918	
   919		/* HFLIP & VFLIP */
   920		v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops,
   921					V4L2_CID_HFLIP, 0, 1, 1, 0);
   922		v4l2_ctrl_new_std(ctrl_hdlr, &imx471_ctrl_ops,
   923					V4L2_CID_VFLIP, 0, 1, 1, 0);
   924	
   925		if (ctrl_hdlr->error) {
   926			ret = ctrl_hdlr->error;
   927			dev_err(&client->dev, "%s control init failed: %d", __func__, ret);
   928			goto error;
   929		}
   930	
   931		ret = v4l2_ctrl_new_fwnode_properties(ctrl_hdlr, &imx471_ctrl_ops,
 > 932								      &props);
   933		if (ret)
   934			goto error;
   935	
   936		imx471->sd.ctrl_handler = ctrl_hdlr;
   937	
   938		return 0;
   939	
   940	error:
   941		v4l2_ctrl_handler_free(ctrl_hdlr);
   942		mutex_destroy(&imx471->mutex);
   943	
   944		return ret;
   945	}
   946	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2026-04-21 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202604212217.fsrKOa3z-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=gdamjan@gmail.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=serin.yeh@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox