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@xxxxxxxxx/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@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202309232011.PQpo1XF0-lkp@xxxxxxxxx/ 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