linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	Jacopo Mondi <jacopo@jmondi.org>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-media@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Biju Das <biju.das.jz@bp.renesas.com>,
	Prabhakar <prabhakar.csengg@gmail.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH 1/2] media: i2c: ov772x: Add support for BT656 mode
Date: Sat, 25 Jul 2020 15:53:35 +0800	[thread overview]
Message-ID: <202007251548.Qo2odrrI%lkp@intel.com> (raw)
In-Reply-To: <1595603296-25903-2-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com>

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

Hi Lad,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on v5.8-rc6 next-20200724]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Lad-Prabhakar/media-i2c-ov772x-Enable-BT656-mode-and-test-pattern-support/20200724-231016
base:   git://linuxtv.org/media_tree.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1d09ecf36175f7910ffedd6d497c07b5c74c22fb)
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
        # install x86_64 cross compiling tool for clang build
        # apt-get install binutils-x86-64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 

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/ov772x.c:1425:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
           if (!endpoint) {
               ^~~~~~~~~
   drivers/media/i2c/ov772x.c:1471:9: note: uninitialized use occurs here
           return ret;
                  ^~~
   drivers/media/i2c/ov772x.c:1425:2: note: remove the 'if' if its condition is always false
           if (!endpoint) {
           ^~~~~~~~~~~~~~~~
   drivers/media/i2c/ov772x.c:1363:11: note: initialize the variable 'ret' to silence this warning
           int                     ret;
                                      ^
                                       = 0
   1 warning generated.

vim +1425 drivers/media/i2c/ov772x.c

  1354	
  1355	/*
  1356	 * i2c_driver function
  1357	 */
  1358	
  1359	static int ov772x_probe(struct i2c_client *client)
  1360	{
  1361		struct fwnode_handle *endpoint;
  1362		struct ov772x_priv	*priv;
  1363		int			ret;
  1364		static const struct regmap_config ov772x_regmap_config = {
  1365			.reg_bits = 8,
  1366			.val_bits = 8,
  1367			.max_register = DSPAUTO,
  1368		};
  1369	
  1370		if (!client->dev.of_node && !client->dev.platform_data) {
  1371			dev_err(&client->dev,
  1372				"Missing ov772x platform data for non-DT device\n");
  1373			return -EINVAL;
  1374		}
  1375	
  1376		priv = devm_kzalloc(&client->dev, sizeof(*priv), GFP_KERNEL);
  1377		if (!priv)
  1378			return -ENOMEM;
  1379	
  1380		priv->regmap = devm_regmap_init_sccb(client, &ov772x_regmap_config);
  1381		if (IS_ERR(priv->regmap)) {
  1382			dev_err(&client->dev, "Failed to allocate register map\n");
  1383			return PTR_ERR(priv->regmap);
  1384		}
  1385	
  1386		priv->info = client->dev.platform_data;
  1387		mutex_init(&priv->lock);
  1388	
  1389		v4l2_i2c_subdev_init(&priv->subdev, client, &ov772x_subdev_ops);
  1390		priv->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
  1391				      V4L2_SUBDEV_FL_HAS_EVENTS;
  1392		v4l2_ctrl_handler_init(&priv->hdl, 3);
  1393		/* Use our mutex for the controls */
  1394		priv->hdl.lock = &priv->lock;
  1395		priv->vflip_ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov772x_ctrl_ops,
  1396						     V4L2_CID_VFLIP, 0, 1, 1, 0);
  1397		priv->hflip_ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov772x_ctrl_ops,
  1398						     V4L2_CID_HFLIP, 0, 1, 1, 0);
  1399		priv->band_filter_ctrl = v4l2_ctrl_new_std(&priv->hdl, &ov772x_ctrl_ops,
  1400							   V4L2_CID_BAND_STOP_FILTER,
  1401							   0, 256, 1, 0);
  1402		priv->subdev.ctrl_handler = &priv->hdl;
  1403		if (priv->hdl.error) {
  1404			ret = priv->hdl.error;
  1405			goto error_mutex_destroy;
  1406		}
  1407	
  1408		priv->clk = clk_get(&client->dev, NULL);
  1409		if (IS_ERR(priv->clk)) {
  1410			dev_err(&client->dev, "Unable to get xclk clock\n");
  1411			ret = PTR_ERR(priv->clk);
  1412			goto error_ctrl_free;
  1413		}
  1414	
  1415		priv->pwdn_gpio = gpiod_get_optional(&client->dev, "powerdown",
  1416						     GPIOD_OUT_LOW);
  1417		if (IS_ERR(priv->pwdn_gpio)) {
  1418			dev_info(&client->dev, "Unable to get GPIO \"powerdown\"");
  1419			ret = PTR_ERR(priv->pwdn_gpio);
  1420			goto error_clk_put;
  1421		}
  1422	
  1423		endpoint = fwnode_graph_get_next_endpoint(dev_fwnode(&client->dev),
  1424							  NULL);
> 1425		if (!endpoint) {
  1426			dev_err(&client->dev, "endpoint node not found\n");
  1427			goto error_clk_put;
  1428		}
  1429	
  1430		ret = v4l2_fwnode_endpoint_parse(endpoint, &priv->ep);
  1431		fwnode_handle_put(endpoint);
  1432		if (ret) {
  1433			dev_err(&client->dev, "Could not parse endpoint\n");
  1434			goto error_clk_put;
  1435		}
  1436	
  1437		ret = ov772x_video_probe(priv);
  1438		if (ret < 0)
  1439			goto error_gpio_put;
  1440	

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

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

  reply	other threads:[~2020-07-25  7:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 15:08 [PATCH 0/2] media: i2c: ov772x: Enable BT656 mode and test pattern support Lad Prabhakar
2020-07-24 15:08 ` [PATCH 1/2] media: i2c: ov772x: Add support for BT656 mode Lad Prabhakar
2020-07-25  7:53   ` kernel test robot [this message]
2020-07-31 16:02   ` Sakari Ailus
2020-08-01  8:54     ` Lad, Prabhakar
2020-07-24 15:08 ` [PATCH 2/2] media: i2c: ov772x: Add test pattern control Lad Prabhakar

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=202007251548.Qo2odrrI%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jacopo@jmondi.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.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;
as well as URLs for NNTP newsgroup(s).