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

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

 



Hi Hans,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   deacdb3e3979979016fcd0ffd518c320a62ad166
commit: 839b9d2c59b3b3e74cb58b457615ff61154d8a41 media: omap_vout: fix various v4l2-compliance failures
date:   12 months ago
config: i386-randconfig-r032-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
        git checkout 839b9d2c59b3b3e74cb58b457615ff61154d8a41
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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_create_video_devices':
>> drivers/media/platform/omap/omap_vout.c:2040:21: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
    2040 |   vout->fbuf.base = (void *)info.paddr;
         |                     ^

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

  1999	
  2000	/* Create video out devices */
  2001	static int __init omap_vout_create_video_devices(struct platform_device *pdev)
  2002	{
  2003		int ret = 0, k;
  2004		struct omap_vout_device *vout;
  2005		struct video_device *vfd = NULL;
  2006		struct v4l2_device *v4l2_dev = platform_get_drvdata(pdev);
  2007		struct omap2video_device *vid_dev = container_of(v4l2_dev,
  2008				struct omap2video_device, v4l2_dev);
  2009		struct omap_overlay *ovl = vid_dev->overlays[0];
  2010		struct omap_overlay_info info;
  2011	
  2012		ovl->get_overlay_info(ovl, &info);
  2013	
  2014		for (k = 0; k < pdev->num_resources; k++) {
  2015	
  2016			vout = kzalloc(sizeof(struct omap_vout_device), GFP_KERNEL);
  2017			if (!vout) {
  2018				dev_err(&pdev->dev, ": could not allocate memory\n");
  2019				return -ENOMEM;
  2020			}
  2021	
  2022			vout->vid = k;
  2023			vid_dev->vouts[k] = vout;
  2024			vout->vid_dev = vid_dev;
  2025			/* Select video2 if only 1 overlay is controlled by V4L2 */
  2026			if (pdev->num_resources == 1)
  2027				vout->vid_info.overlays[0] = vid_dev->overlays[k + 2];
  2028			else
  2029				/* Else select video1 and video2 one by one. */
  2030				vout->vid_info.overlays[0] = vid_dev->overlays[k + 1];
  2031			vout->vid_info.num_overlays = 1;
  2032			vout->vid_info.id = k + 1;
  2033			/*
  2034			 * Set the framebuffer base, this allows applications to find
  2035			 * the fb corresponding to this overlay.
  2036			 *
  2037			 * To be precise: fbuf.base should match smem_start of
  2038			 * struct fb_fix_screeninfo.
  2039			 */
> 2040			vout->fbuf.base = (void *)info.paddr;
  2041	
  2042			/* Set VRFB as rotation_type for omap2 and omap3 */
  2043			if (omap_vout_dss_omap24xx() || omap_vout_dss_omap34xx())
  2044				vout->vid_info.rotation_type = VOUT_ROT_VRFB;
  2045	
  2046			/* Setup the default configuration for the video devices
  2047			 */
  2048			if (omap_vout_setup_video_data(vout) != 0) {
  2049				ret = -ENOMEM;
  2050				goto error;
  2051			}
  2052	
  2053			/* Allocate default number of buffers for the video streaming
  2054			 * and reserve the VRFB space for rotation
  2055			 */
  2056			if (omap_vout_setup_video_bufs(pdev, k) != 0) {
  2057				ret = -ENOMEM;
  2058				goto error1;
  2059			}
  2060	
  2061			/* Register the Video device with V4L2
  2062			 */
  2063			vfd = vout->vfd;
  2064			if (video_register_device(vfd, VFL_TYPE_GRABBER, -1) < 0) {
  2065				dev_err(&pdev->dev,
  2066					": Could not register Video for Linux device\n");
  2067				vfd->minor = -1;
  2068				ret = -ENODEV;
  2069				goto error2;
  2070			}
  2071			video_set_drvdata(vfd, vout);
  2072	
  2073			dev_info(&pdev->dev,
  2074				 ": registered and initialized video device %d\n",
  2075				 vfd->minor);
  2076			if (k == (pdev->num_resources - 1))
  2077				return 0;
  2078	
  2079			continue;
  2080	error2:
  2081			if (vout->vid_info.rotation_type == VOUT_ROT_VRFB)
  2082				omap_vout_release_vrfb(vout);
  2083			omap_vout_free_buffers(vout);
  2084	error1:
  2085			video_device_release(vfd);
  2086	error:
  2087			kfree(vout);
  2088			return ret;
  2089		}
  2090	
  2091		return -ENODEV;
  2092	}
  2093	/* Driver functions */
  2094	static void omap_vout_cleanup_device(struct omap_vout_device *vout)
  2095	{
  2096		struct video_device *vfd;
  2097		struct omapvideo_info *ovid;
  2098	
  2099		if (!vout)
  2100			return;
  2101	
  2102		vfd = vout->vfd;
  2103		ovid = &vout->vid_info;
  2104		if (vfd) {
  2105			if (!video_is_registered(vfd)) {
  2106				/*
  2107				 * The device was never registered, so release the
  2108				 * video_device struct directly.
  2109				 */
  2110				video_device_release(vfd);
  2111			} else {
  2112				/*
  2113				 * The unregister function will release the video_device
  2114				 * struct as well as unregistering it.
  2115				 */
  2116				video_unregister_device(vfd);
  2117			}
  2118		}
  2119		v4l2_ctrl_handler_free(&vout->ctrl_handler);
  2120		if (ovid->rotation_type == VOUT_ROT_VRFB) {
  2121			omap_vout_release_vrfb(vout);
  2122			/* Free the VRFB buffer if allocated
  2123			 * init time
  2124			 */
  2125			if (vout->vrfb_static_allocation)
  2126				omap_vout_free_vrfb_buffers(vout);
  2127		}
  2128		omap_vout_free_buffers(vout);
  2129	
  2130		kfree(vout);
  2131	}
  2132	

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

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