mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: shravan kumar <shravan.chippa@microchip.com>,
	paul.j.murphy@intel.com, daniele.alessandrelli@intel.com,
	mchehab@kernel.org
Cc: kbuild-all@lists.01.org, linux-media@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Shravan Chippa <shravan.chippa@microchip.com>,
	Conor Dooley <conor.dooley@microchip.com>,
	Prakash Battu <Prakash.Battu@microchip.com>
Subject: Re: [PATCH v2] media: i2c: imx334: support lower bandwidth mode
Date: Thu, 1 Sep 2022 14:59:21 +0800	[thread overview]
Message-ID: <202209011420.aFw0x1Jm-lkp@intel.com> (raw)
In-Reply-To: <20220830060613.11335-1-shravan.chippa@microchip.com>

Hi shravan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v6.0-rc3]
[also build test WARNING on linus/master next-20220831]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/shravan-kumar/media-i2c-imx334-support-lower-bandwidth-mode/20220830-140816
base:    b90cb1053190353cc30f0fef0ef1f378ccc063c5
config: openrisc-randconfig-m031-20220830 (https://download.01.org/0day-ci/archive/20220901/202209011420.aFw0x1Jm-lkp@intel.com/config)
compiler: or1k-linux-gcc (GCC) 12.1.0

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

smatch warnings:
drivers/media/i2c/imx334.c:832 imx334_set_pad_format() warn: unsigned 'code' is never less than zero.

vim +/code +832 drivers/media/i2c/imx334.c

   811	
   812	/**
   813	 * imx334_set_pad_format() - Set subdevice pad format
   814	 * @sd: pointer to imx334 V4L2 sub-device structure
   815	 * @sd_state: V4L2 sub-device state
   816	 * @fmt: V4L2 sub-device format need to be set
   817	 *
   818	 * Return: 0 if successful, error code otherwise.
   819	 */
   820	static int imx334_set_pad_format(struct v4l2_subdev *sd,
   821					 struct v4l2_subdev_state *sd_state,
   822					 struct v4l2_subdev_format *fmt)
   823	{
   824		struct imx334 *imx334 = to_imx334(sd);
   825		const struct imx334_mode *mode;
   826		int ret = 0;
   827		u32 code;
   828	
   829		mutex_lock(&imx334->mutex);
   830	
   831		code = imx219_get_format_code(imx334, fmt);
 > 832		if (code < 0)
   833			return -EINVAL;
   834	
   835		imx334->cur_code = code;
   836	
   837		mode = v4l2_find_nearest_size(supported_modes,
   838					      ARRAY_SIZE(supported_modes),
   839					      width, height,
   840					      fmt->format.width, fmt->format.height);
   841	
   842		imx334_fill_pad_format(imx334, mode, fmt);
   843	
   844		if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) {
   845			struct v4l2_mbus_framefmt *framefmt;
   846	
   847			framefmt = v4l2_subdev_get_try_format(sd, sd_state, fmt->pad);
   848			*framefmt = fmt->format;
   849		} else if (imx334->cur_mode != mode) {
   850			ret = imx334_update_controls(imx334, mode);
   851			if (!ret)
   852				imx334->cur_mode = mode;
   853		}
   854	
   855		mutex_unlock(&imx334->mutex);
   856	
   857		return ret;
   858	}
   859	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

      reply	other threads:[~2022-09-01  7:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30  6:06 shravan kumar
2022-09-01  6:59 ` 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=202209011420.aFw0x1Jm-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Prakash.Battu@microchip.com \
    --cc=conor.dooley@microchip.com \
    --cc=daniele.alessandrelli@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=paul.j.murphy@intel.com \
    --cc=shravan.chippa@microchip.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

all inboxes | Powered by JetHome®