linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org
Subject: drivers/media/platform/omap/omap_vout.c:2040:21: warning: cast to pointer from integer of different size
Date: Sat, 1 Aug 2020 03:50:41 +0800	[thread overview]
Message-ID: <202008010338.hC0Nqpba%lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 5550 bytes --]

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@intel.com>

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@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 46567 bytes --]

                 reply	other threads:[~2020-07-31 20:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202008010338.hC0Nqpba%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hverkuil@xs4all.nl \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).