public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-media@vger.kernel.org
Subject: [sailus-media-tree:metadata 27/37] drivers/media/i2c/ccs/ccs-core.c:2421:55: sparse: sparse: Using plain integer as NULL pointer
Date: Sat, 23 Sep 2023 21:02:20 +0800	[thread overview]
Message-ID: <202309232011.PQpo1XF0-lkp@intel.com> (raw)

tree:   git://linuxtv.org/sailus/media_tree.git metadata
head:   ecdcf40f8de5c43837eecf44f4927cfd4e1b7f5d
commit: aad8c9a0d2db42312d3e6c64bbbc2248f8915c30 [27/37] media: ccs: Add support for embedded data stream
config: x86_64-randconfig-123-20230923 (https://download.01.org/0day-ci/archive/20230923/202309232011.PQpo1XF0-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230923/202309232011.PQpo1XF0-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/202309232011.PQpo1XF0-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/media/i2c/ccs/ccs-core.c:2421:55: sparse: sparse: Using plain integer as NULL pointer

vim +2421 drivers/media/i2c/ccs/ccs-core.c

  2395	
  2396	static int ccs_set_format(struct v4l2_subdev *subdev,
  2397				  struct v4l2_subdev_state *sd_state,
  2398				  struct v4l2_subdev_format *fmt)
  2399	{
  2400		struct ccs_sensor *sensor = to_ccs_sensor(subdev);
  2401		struct ccs_subdev *ssd = to_ccs_subdev(subdev);
  2402		struct v4l2_rect *crops[CCS_PADS];
  2403	
  2404		if (subdev == &sensor->src->sd && fmt->pad == CCS_PAD_META)
  2405			return ccs_get_format(subdev, sd_state, fmt);
  2406	
  2407		mutex_lock(&sensor->mutex);
  2408	
  2409		if (subdev == &sensor->src->sd && fmt->stream == CCS_STREAM_META) {
  2410			ccs_set_format_meta(subdev, sd_state, &fmt->format);
  2411	
  2412			mutex_unlock(&sensor->mutex);
  2413	
  2414			return 0;
  2415		}
  2416	
  2417		if (fmt->pad == ssd->source_pad) {
  2418			int rval;
  2419	
  2420			rval = ccs_set_format_source(subdev, sd_state, fmt);
> 2421			ccs_set_format_meta(subdev, sd_state, 0);
  2422	
  2423			mutex_unlock(&sensor->mutex);
  2424	
  2425			return rval;
  2426		}
  2427	
  2428		/* Sink pad. Width and height are changeable here. */
  2429		fmt->format.code = __ccs_get_mbus_code(subdev, fmt->pad);
  2430		fmt->format.width &= ~1;
  2431		fmt->format.height &= ~1;
  2432		fmt->format.field = V4L2_FIELD_NONE;
  2433	
  2434		fmt->format.width =
  2435			clamp(fmt->format.width,
  2436			      CCS_LIM(sensor, MIN_X_OUTPUT_SIZE),
  2437			      CCS_LIM(sensor, MAX_X_OUTPUT_SIZE));
  2438		fmt->format.height =
  2439			clamp(fmt->format.height,
  2440			      CCS_LIM(sensor, MIN_Y_OUTPUT_SIZE),
  2441			      CCS_LIM(sensor, MAX_Y_OUTPUT_SIZE));
  2442	
  2443		ccs_get_crop_compose(subdev, sd_state, crops, NULL);
  2444	
  2445		crops[ssd->sink_pad]->left = 0;
  2446		crops[ssd->sink_pad]->top = 0;
  2447		crops[ssd->sink_pad]->width = fmt->format.width;
  2448		crops[ssd->sink_pad]->height = fmt->format.height;
  2449		ccs_propagate(subdev, sd_state, fmt->which, V4L2_SEL_TGT_CROP);
  2450	
  2451		mutex_unlock(&sensor->mutex);
  2452	
  2453		return 0;
  2454	}
  2455	

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

                 reply	other threads:[~2023-09-23 13: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=202309232011.PQpo1XF0-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-media@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=sakari.ailus@linux.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