drivers/media/platform/omap/omap_vout.c:979:37: warning: cast to pointer from integer of different size

From: kernel test robot
Date: Sat Apr 10 2021 - 18:22:36 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 52e44129fba5cfc4e351fdb5e45849afc74d9a53
commit: a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a media: Kconfig: not all V4L2 platform drivers are for camera
date: 12 months ago
config: arc-randconfig-r025-20210411 (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a19f228b8dd9a67e8de4ebd4eac8a4c94ec39d1a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_vb2_prepare':
>> drivers/media/platform/omap/omap_vout.c:979:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
979 | vout->queued_buf_addr[vb->index] = (u8 *)buf_phy_addr;
| ^
drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_create_video_devices':
drivers/media/platform/omap/omap_vout.c:1479:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1479 | vout->fbuf.base = (void *)info.paddr;
| ^

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for VIDEO_OV7670
Depends on MEDIA_SUPPORT && MEDIA_CAMERA_SUPPORT && I2C && VIDEO_V4L2
Selected by
- VIDEO_CAFE_CCIC && MEDIA_SUPPORT && MEDIA_PLATFORM_SUPPORT && V4L_PLATFORM_DRIVERS && PCI && I2C && VIDEO_V4L2 && COMMON_CLK
- VIDEO_MMP_CAMERA && MEDIA_SUPPORT && MEDIA_PLATFORM_SUPPORT && V4L_PLATFORM_DRIVERS && I2C && VIDEO_V4L2 && (ARCH_MMP || COMPILE_TEST && COMMON_CLK


vim +979 drivers/media/platform/omap/omap_vout.c

5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 961
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 962 static int omap_vout_vb2_prepare(struct vb2_buffer *vb)
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 963 {
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 964 struct omap_vout_device *vout = vb2_get_drv_priv(vb->vb2_queue);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 965 struct omapvideo_info *ovid = &vout->vid_info;
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 966 struct omap_vout_buffer *voutbuf = vb2_to_omap_vout_buffer(vb);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 967 dma_addr_t buf_phy_addr = vb2_dma_contig_plane_dma_addr(vb, 0);
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 968
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 969 if (vb2_plane_size(vb, 0) < vout->pix.sizeimage) {
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 970 v4l2_dbg(1, debug, &vout->vid_dev->v4l2_dev,
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 971 "%s data will not fit into plane (%lu < %u)\n",
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 972 __func__, vb2_plane_size(vb, 0), vout->pix.sizeimage);
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 973 return -EINVAL;
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 974 }
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 975
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 976 vb2_set_plane_payload(vb, 0, vout->pix.sizeimage);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 977 voutbuf->vbuf.field = V4L2_FIELD_NONE;
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 978
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 @979 vout->queued_buf_addr[vb->index] = (u8 *)buf_phy_addr;
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 980 if (ovid->rotation_type == VOUT_ROT_VRFB)
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 981 return omap_vout_prepare_vrfb(vout, vb);
256acbebdc3b2d drivers/media/platform/omap/omap_vout.c Hans Verkuil 2019-07-30 982 return 0;
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 983 }
5c7ab6348e7b3f drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 984

:::::: The code at line 979 was first introduced by commit
:::::: 256acbebdc3b2ddfad4a5b1aa99488fad34b0f0d media: omap_vout: convert to vb2

:::::: TO: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
:::::: CC: Mauro Carvalho Chehab <mchehab+samsung@xxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip