linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Hans Verkuil <hverkuil@xs4all.nl>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-media@vger.kernel.org,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Subject: Re: [PATCH v3 3/3] media: i2c: Introduce a driver for the Techwell TW9900 decoder
Date: Tue, 5 Jan 2021 12:51:13 +0800	[thread overview]
Message-ID: <202101051246.saGPBMRT-lkp@intel.com> (raw)
In-Reply-To: <20201222160407.501586-4-maxime.chevallier@bootlin.com>

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

Hi Maxime,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linuxtv-media/master]
[also build test WARNING on robh/for-next linus/master v5.11-rc2 next-20210104]
[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/Maxime-Chevallier/media-i2c-Introduce-driver-for-the-TW9900-decoder/20201223-000948
base:   git://linuxtv.org/media_tree.git master
config: arm64-randconfig-r001-20210105 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 5c951623bc8965fa1e89660f2f5f4a2944e4981a)
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 arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # https://github.com/0day-ci/linux/commit/cdf8ecd519454783c60d4bca02b9279f8133ef77
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maxime-Chevallier/media-i2c-Introduce-driver-for-the-TW9900-decoder/20201223-000948
        git checkout cdf8ecd519454783c60d4bca02b9279f8133ef77
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

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/tw9900.c:521:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
                   return ret;
                          ^~~
   drivers/media/i2c/tw9900.c:505:9: note: initialize the variable 'ret' to silence this warning
           int ret;
                  ^
                   = 0
   1 warning generated.


vim +/ret +521 drivers/media/i2c/tw9900.c

   498	
   499	static int tw9900_probe(struct i2c_client *client,
   500				const struct i2c_device_id *id)
   501	{
   502		struct device *dev = &client->dev;
   503		struct v4l2_ctrl_handler *hdl;
   504		struct tw9900 *tw9900;
   505		int ret;
   506	
   507		tw9900 = devm_kzalloc(dev, sizeof(*tw9900), GFP_KERNEL);
   508		if (!tw9900)
   509			return -ENOMEM;
   510	
   511		tw9900->client = client;
   512		tw9900->cur_mode = &supported_modes[0];
   513	
   514		tw9900->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
   515		if (IS_ERR(tw9900->reset_gpio))
   516			tw9900->reset_gpio = NULL;
   517	
   518		tw9900->regulator = devm_regulator_get(&tw9900->client->dev, "vdd");
   519		if (IS_ERR(tw9900->regulator)) {
   520			dev_err(dev, "Failed to get power regulator\n");
 > 521			return ret;
   522		}
   523	
   524		v4l2_i2c_subdev_init(&tw9900->subdev, client, &tw9900_subdev_ops);
   525		tw9900->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |
   526					V4L2_SUBDEV_FL_HAS_EVENTS;
   527	
   528		hdl = &tw9900->hdl;
   529	
   530		v4l2_ctrl_handler_init(hdl, 2);
   531	
   532		v4l2_ctrl_new_std(hdl, &tw9900_ctrl_ops, V4L2_CID_BRIGHTNESS,
   533				  -128, 127, 1, 0);
   534		v4l2_ctrl_new_std(hdl, &tw9900_ctrl_ops, V4L2_CID_CONTRAST,
   535				  0, 255, 1, 0x60);
   536	
   537		tw9900->subdev.ctrl_handler = hdl;
   538		if (hdl->error) {
   539			int err = hdl->error;
   540	
   541			v4l2_ctrl_handler_free(hdl);
   542			return err;
   543		}
   544	
   545		ret = tw9900_power_on(tw9900);
   546		if (ret)
   547			return ret;
   548	
   549		ret = tw9900_check_id(tw9900, client);
   550		if (ret)
   551			goto err_power_off;
   552	
   553		tw9900->subdev.internal_ops = &tw9900_internal_ops;
   554		tw9900->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
   555		tw9900->pad.flags = MEDIA_PAD_FL_SOURCE;
   556		tw9900->subdev.entity.function = MEDIA_ENT_F_DV_DECODER;
   557	
   558		ret = media_entity_pads_init(&tw9900->subdev.entity, 1, &tw9900->pad);
   559		if (ret < 0)
   560			goto err_power_off;
   561	
   562		ret = v4l2_async_register_subdev(&tw9900->subdev);
   563		if (ret) {
   564			dev_err(dev, "v4l2 async register subdev failed\n");
   565			goto err_clean_entity;
   566		}
   567	
   568		pm_runtime_set_active(dev);
   569		pm_runtime_enable(dev);
   570		pm_runtime_idle(dev);
   571	
   572		return 0;
   573	
   574	err_clean_entity:
   575		media_entity_cleanup(&tw9900->subdev.entity);
   576	err_power_off:
   577		tw9900_power_off(tw9900);
   578	
   579		return ret;
   580	}
   581	

---
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: 46997 bytes --]

      reply	other threads:[~2021-01-05  4:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-22 16:04 [PATCH v3 0/3] media: i2c: Introduce driver for the TW9900 decoder Maxime Chevallier
2020-12-22 16:04 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add techwell vendor prefix Maxime Chevallier
2020-12-22 16:04 ` [PATCH v3 2/3] media: dt-bindings: media: i2c: Add bindings for TW9900 Maxime Chevallier
2020-12-23 17:47   ` Rob Herring
2020-12-22 16:04 ` [PATCH v3 3/3] media: i2c: Introduce a driver for the Techwell TW9900 decoder Maxime Chevallier
2021-01-05  4:51   ` kernel test robot [this message]

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=202101051246.saGPBMRT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=thomas.petazzoni@bootlin.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).