[ragnatech:media-tree 306/317] drivers/staging/media/imx/imx7-media-csi.c:1086:11: error: passing argument 2 of 'imx_media_mbus_fmt_to_pix_fmt' from incompatible pointer type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://git.ragnatech.se/linux media-tree
head:   9fabe1d108ca4755a880de43f751f1c054f8894d
commit: 05f634040c0d05f59f2dcd39722157cb3b57c85b [306/317] media: staging/imx7: add imx7 CSI subdev driver
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 05f634040c0d05f59f2dcd39722157cb3b57c85b
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=sh 

Note: the ragnatech/media-tree HEAD 9fabe1d108ca4755a880de43f751f1c054f8894d builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/staging/media/imx/imx7-media-csi.c: In function 'imx7_csi_set_fmt':
>> drivers/staging/media/imx/imx7-media-csi.c:1086:11: error: passing argument 2 of 'imx_media_mbus_fmt_to_pix_fmt' from incompatible pointer type [-Werror=incompatible-pointer-types]
              &csi->format_mbus[IMX7_CSI_PAD_SRC],
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/staging/media/imx/imx7-media-csi.c:30:
   drivers/staging/media/imx/imx-media.h:183:25: note: expected 'struct v4l2_rect *' but argument is of type 'struct v4l2_mbus_framefmt *'
          struct v4l2_rect *compose,
          ~~~~~~~~~~~~~~~~~~^~~~~~~
   drivers/staging/media/imx/imx7-media-csi.c:1087:18: error: passing argument 3 of 'imx_media_mbus_fmt_to_pix_fmt' from incompatible pointer type [-Werror=incompatible-pointer-types]
              csi->cc[IMX7_CSI_PAD_SRC]);
              ~~~~~~~^~~~~~~~~~~~~~~~~~
   In file included from drivers/staging/media/imx/imx7-media-csi.c:30:
   drivers/staging/media/imx/imx-media.h:184:40: note: expected 'const struct v4l2_mbus_framefmt *' but argument is of type 'const struct imx_media_pixfmt *'
          const struct v4l2_mbus_framefmt *mbus,
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
>> drivers/staging/media/imx/imx7-media-csi.c:1085:2: error: too few arguments to function 'imx_media_mbus_fmt_to_pix_fmt'
     imx_media_mbus_fmt_to_pix_fmt(&vdev_fmt,
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/staging/media/imx/imx7-media-csi.c:30:
   drivers/staging/media/imx/imx-media.h:182:5: note: declared here
    int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix,
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/staging/media/imx/imx7-media-csi.c:1089:2: error: too few arguments to function 'imx_media_capture_device_set_format'
     imx_media_capture_device_set_format(vdev, &vdev_fmt);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from drivers/staging/media/imx/imx7-media-csi.c:30:
   drivers/staging/media/imx/imx-media.h:278:6: note: declared here
    void imx_media_capture_device_set_format(struct imx_media_video_dev *vdev,
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/imx_media_mbus_fmt_to_pix_fmt +1086 drivers/staging/media/imx/imx7-media-csi.c

  1029	
  1030	static int imx7_csi_set_fmt(struct v4l2_subdev *sd,
  1031				    struct v4l2_subdev_pad_config *cfg,
  1032				    struct v4l2_subdev_format *sdformat)
  1033	{
  1034		struct imx7_csi *csi = v4l2_get_subdevdata(sd);
  1035		struct imx_media_video_dev *vdev = csi->vdev;
  1036		const struct imx_media_pixfmt *outcc;
  1037		struct v4l2_mbus_framefmt *outfmt;
  1038		struct v4l2_pix_format vdev_fmt;
  1039		const struct imx_media_pixfmt *cc;
  1040		struct v4l2_mbus_framefmt *fmt;
  1041		struct v4l2_subdev_format format;
  1042		int ret = 0;
  1043	
  1044		if (sdformat->pad >= IMX7_CSI_PADS_NUM)
  1045			return -EINVAL;
  1046	
  1047		mutex_lock(&csi->lock);
  1048	
  1049		if (csi->is_streaming) {
  1050			ret = -EBUSY;
  1051			goto out_unlock;
  1052		}
  1053	
  1054		imx7_csi_try_fmt(csi, cfg, sdformat, &cc);
  1055	
  1056		fmt = imx7_csi_get_format(csi, cfg, sdformat->pad, sdformat->which);
  1057		if (!fmt) {
  1058			ret = -EINVAL;
  1059			goto out_unlock;
  1060		}
  1061	
  1062		*fmt = sdformat->format;
  1063	
  1064		if (sdformat->pad == IMX7_CSI_PAD_SINK) {
  1065			/* propagate format to source pads */
  1066			format.pad = IMX7_CSI_PAD_SRC;
  1067			format.which = sdformat->which;
  1068			format.format = sdformat->format;
  1069			imx7_csi_try_fmt(csi, cfg, &format, &outcc);
  1070	
  1071			outfmt = imx7_csi_get_format(csi, cfg, IMX7_CSI_PAD_SRC,
  1072						     sdformat->which);
  1073			*outfmt = format.format;
  1074	
  1075			if (sdformat->which == V4L2_SUBDEV_FORMAT_ACTIVE)
  1076				csi->cc[IMX7_CSI_PAD_SRC] = outcc;
  1077		}
  1078	
  1079		if (sdformat->which == V4L2_SUBDEV_FORMAT_TRY)
  1080			goto out_unlock;
  1081	
  1082		csi->cc[sdformat->pad] = cc;
  1083	
  1084		/* propagate output pad format to capture device */
> 1085		imx_media_mbus_fmt_to_pix_fmt(&vdev_fmt,
> 1086					      &csi->format_mbus[IMX7_CSI_PAD_SRC],
> 1087					      csi->cc[IMX7_CSI_PAD_SRC]);
  1088		mutex_unlock(&csi->lock);
> 1089		imx_media_capture_device_set_format(vdev, &vdev_fmt);
  1090	
  1091		return 0;
  1092	
  1093	out_unlock:
  1094		mutex_unlock(&csi->lock);
  1095	
  1096		return ret;
  1097	}
  1098	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux