drivers/media/i2c/saa6752hs.c:598:18: error: implicit declaration of function 'v4l2_subdev_state_get_format'
Subsystems (2)
kernel test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 0f5f12ac05f36f117e793656c3f560625e927f1b commit: bc0e8d91feec72b19199298dca470c5816a52105 [2291/4884] media: v4l: subdev: Switch to stream-aware state functions config: arc-randconfig-c031-20221114 (https://download.01.org/0day-ci/archive/20231205/[email protected]/config) compiler: arceb-elf-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231205/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
drivers/media/i2c/saa6752hs.c: In function 'saa6752hs_set_fmt':
>> drivers/media/i2c/saa6752hs.c:598:18: error: implicit declaration of function 'v4l2_subdev_state_get_format' [-Werror=implicit-function-declaration]
598 | *v4l2_subdev_state_get_format(sd_state, 0) = *f;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/saa6752hs.c:598:17: error: invalid type argument of unary '*' (have 'int')
598 | *v4l2_subdev_state_get_format(sd_state, 0) = *f;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~cc1: some warnings being treated as errors
vim +/v4l2_subdev_state_get_format +598 drivers/media/i2c/saa6752hs.c
564
565 static int saa6752hs_set_fmt(struct v4l2_subdev *sd,
566 struct v4l2_subdev_state *sd_state,
567 struct v4l2_subdev_format *format)
568 {
569 struct v4l2_mbus_framefmt *f = &format->format;
570 struct saa6752hs_state *h = to_state(sd);
571 int dist_352, dist_480, dist_720;
572
573 if (format->pad)
574 return -EINVAL;
575
576 f->code = MEDIA_BUS_FMT_FIXED;
577
578 dist_352 = abs(f->width - 352);
579 dist_480 = abs(f->width - 480);
580 dist_720 = abs(f->width - 720);
581 if (dist_720 < dist_480) {
582 f->width = 720;
583 f->height = 576;
584 } else if (dist_480 < dist_352) {
585 f->width = 480;
586 f->height = 576;
587 } else {
588 f->width = 352;
589 if (abs(f->height - 576) < abs(f->height - 288))
590 f->height = 576;
591 else
592 f->height = 288;
593 }
594 f->field = V4L2_FIELD_INTERLACED;
595 f->colorspace = V4L2_COLORSPACE_SMPTE170M;
596
597 if (format->which == V4L2_SUBDEV_FORMAT_TRY) {
> 598 *v4l2_subdev_state_get_format(sd_state, 0) = *f; 599 return 0; 600 } 601 602 /* 603 FIXME: translate and round width/height into EMPRESS 604 subsample type: 605 606 type | PAL | NTSC 607 --------------------------- 608 SIF | 352x288 | 352x240 609 1/2 D1 | 352x576 | 352x480 610 2/3 D1 | 480x576 | 480x480 611 D1 | 720x576 | 720x480
612 */
613
614 if (f->code != MEDIA_BUS_FMT_FIXED)
615 return -EINVAL;
616
617 if (f->width == 720)
618 h->video_format = SAA6752HS_VF_D1;
619 else if (f->width == 480)
620 h->video_format = SAA6752HS_VF_2_3_D1;
621 else if (f->height == 576)
622 h->video_format = SAA6752HS_VF_1_2_D1;
623 else
624 h->video_format = SAA6752HS_VF_SIF;
625 return 0;
626 }
627
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki