[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202007171624.FDsiPBuz%lkp@intel.com>
Date: Fri, 17 Jul 2020 16:53:27 +0800
From: kernel test robot <lkp@...el.com>
To: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: sparse: incorrect
type in assignment (different address spaces)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 07a56bb875afbe39dabbf6ba7b83783d166863db
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 4 weeks ago
config: arm64-randconfig-s032-20200717 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *screen_base @@ got void * @@
>> drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: expected char [noderef] __iomem *screen_base
drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: got void *
vim +121 drivers/gpu/drm/msm/msm_fbdev.c
8f67da335d08bc0 Hai Li 2014-06-18 59
c8afe684c95cd17 Rob Clark 2013-06-26 60 static int msm_fbdev_create(struct drm_fb_helper *helper,
c8afe684c95cd17 Rob Clark 2013-06-26 61 struct drm_fb_helper_surface_size *sizes)
c8afe684c95cd17 Rob Clark 2013-06-26 62 {
c8afe684c95cd17 Rob Clark 2013-06-26 63 struct msm_fbdev *fbdev = to_msm_fbdev(helper);
c8afe684c95cd17 Rob Clark 2013-06-26 64 struct drm_device *dev = helper->dev;
f59f62d592a0553 Rob Clark 2017-06-13 65 struct msm_drm_private *priv = dev->dev_private;
c8afe684c95cd17 Rob Clark 2013-06-26 66 struct drm_framebuffer *fb = NULL;
38958bab824a795 Rob Clark 2017-07-11 67 struct drm_gem_object *bo;
c8afe684c95cd17 Rob Clark 2013-06-26 68 struct fb_info *fbi = NULL;
78babc1633c4b06 Rob Clark 2016-11-11 69 uint64_t paddr;
466e5606cc21fc7 Rob Clark 2017-07-11 70 uint32_t format;
466e5606cc21fc7 Rob Clark 2017-07-11 71 int ret, pitch;
466e5606cc21fc7 Rob Clark 2017-07-11 72
466e5606cc21fc7 Rob Clark 2017-07-11 73 format = drm_mode_legacy_fb_format(sizes->surface_bpp, sizes->surface_depth);
c8afe684c95cd17 Rob Clark 2013-06-26 74
c8afe684c95cd17 Rob Clark 2013-06-26 75 DBG("create fbdev: %dx%d@%d (%dx%d)", sizes->surface_width,
c8afe684c95cd17 Rob Clark 2013-06-26 76 sizes->surface_height, sizes->surface_bpp,
c8afe684c95cd17 Rob Clark 2013-06-26 77 sizes->fb_width, sizes->fb_height);
c8afe684c95cd17 Rob Clark 2013-06-26 78
466e5606cc21fc7 Rob Clark 2017-07-11 79 pitch = align_pitch(sizes->surface_width, sizes->surface_bpp);
466e5606cc21fc7 Rob Clark 2017-07-11 80 fb = msm_alloc_stolen_fb(dev, sizes->surface_width,
466e5606cc21fc7 Rob Clark 2017-07-11 81 sizes->surface_height, pitch, format);
c8afe684c95cd17 Rob Clark 2013-06-26 82
c8afe684c95cd17 Rob Clark 2013-06-26 83 if (IS_ERR(fb)) {
6a41da17e87dee2 Mamta Shukla 2018-10-20 84 DRM_DEV_ERROR(dev->dev, "failed to allocate fb\n");
789d4c300e10eb2 Emil Velikov 2018-03-28 85 return PTR_ERR(fb);
c8afe684c95cd17 Rob Clark 2013-06-26 86 }
c8afe684c95cd17 Rob Clark 2013-06-26 87
38958bab824a795 Rob Clark 2017-07-11 88 bo = msm_framebuffer_bo(fb, 0);
38958bab824a795 Rob Clark 2017-07-11 89
c8afe684c95cd17 Rob Clark 2013-06-26 90 mutex_lock(&dev->struct_mutex);
c8afe684c95cd17 Rob Clark 2013-06-26 91
8f67da335d08bc0 Hai Li 2014-06-18 92 /*
8f67da335d08bc0 Hai Li 2014-06-18 93 * NOTE: if we can be guaranteed to be able to map buffer
8f67da335d08bc0 Hai Li 2014-06-18 94 * in panic (ie. lock-safe, etc) we could avoid pinning the
8f67da335d08bc0 Hai Li 2014-06-18 95 * buffer now:
8f67da335d08bc0 Hai Li 2014-06-18 96 */
9fe041f6fdfedd9 Jordan Crouse 2018-11-07 97 ret = msm_gem_get_and_pin_iova(bo, priv->kms->aspace, &paddr);
8f67da335d08bc0 Hai Li 2014-06-18 98 if (ret) {
6a41da17e87dee2 Mamta Shukla 2018-10-20 99 DRM_DEV_ERROR(dev->dev, "failed to get buffer obj iova: %d\n", ret);
0d9509d2119528d Wei Yongjun 2014-08-14 100 goto fail_unlock;
8f67da335d08bc0 Hai Li 2014-06-18 101 }
c8afe684c95cd17 Rob Clark 2013-06-26 102
778014f0c80815e Archit Taneja 2015-07-22 103 fbi = drm_fb_helper_alloc_fbi(helper);
778014f0c80815e Archit Taneja 2015-07-22 104 if (IS_ERR(fbi)) {
6a41da17e87dee2 Mamta Shukla 2018-10-20 105 DRM_DEV_ERROR(dev->dev, "failed to allocate fb info\n");
778014f0c80815e Archit Taneja 2015-07-22 106 ret = PTR_ERR(fbi);
c8afe684c95cd17 Rob Clark 2013-06-26 107 goto fail_unlock;
c8afe684c95cd17 Rob Clark 2013-06-26 108 }
c8afe684c95cd17 Rob Clark 2013-06-26 109
c8afe684c95cd17 Rob Clark 2013-06-26 110 DBG("fbi=%p, dev=%p", fbi, dev);
c8afe684c95cd17 Rob Clark 2013-06-26 111
c8afe684c95cd17 Rob Clark 2013-06-26 112 fbdev->fb = fb;
c8afe684c95cd17 Rob Clark 2013-06-26 113 helper->fb = fb;
c8afe684c95cd17 Rob Clark 2013-06-26 114
c8afe684c95cd17 Rob Clark 2013-06-26 115 fbi->fbops = &msm_fb_ops;
c8afe684c95cd17 Rob Clark 2013-06-26 116
d4eae71f815eeab Daniel Vetter 2019-03-26 117 drm_fb_helper_fill_info(fbi, helper, sizes);
c8afe684c95cd17 Rob Clark 2013-06-26 118
c8afe684c95cd17 Rob Clark 2013-06-26 119 dev->mode_config.fb_base = paddr;
c8afe684c95cd17 Rob Clark 2013-06-26 120
38958bab824a795 Rob Clark 2017-07-11 @121 fbi->screen_base = msm_gem_get_vaddr(bo);
69a834c28fb5144 Rob Clark 2016-05-24 122 if (IS_ERR(fbi->screen_base)) {
69a834c28fb5144 Rob Clark 2016-05-24 123 ret = PTR_ERR(fbi->screen_base);
69a834c28fb5144 Rob Clark 2016-05-24 124 goto fail_unlock;
69a834c28fb5144 Rob Clark 2016-05-24 125 }
38958bab824a795 Rob Clark 2017-07-11 126 fbi->screen_size = bo->size;
c8afe684c95cd17 Rob Clark 2013-06-26 127 fbi->fix.smem_start = paddr;
38958bab824a795 Rob Clark 2017-07-11 128 fbi->fix.smem_len = bo->size;
c8afe684c95cd17 Rob Clark 2013-06-26 129
c8afe684c95cd17 Rob Clark 2013-06-26 130 DBG("par=%p, %dx%d", fbi->par, fbi->var.xres, fbi->var.yres);
c8afe684c95cd17 Rob Clark 2013-06-26 131 DBG("allocated %dx%d fb", fbdev->fb->width, fbdev->fb->height);
c8afe684c95cd17 Rob Clark 2013-06-26 132
c8afe684c95cd17 Rob Clark 2013-06-26 133 mutex_unlock(&dev->struct_mutex);
c8afe684c95cd17 Rob Clark 2013-06-26 134
c8afe684c95cd17 Rob Clark 2013-06-26 135 return 0;
c8afe684c95cd17 Rob Clark 2013-06-26 136
c8afe684c95cd17 Rob Clark 2013-06-26 137 fail_unlock:
c8afe684c95cd17 Rob Clark 2013-06-26 138 mutex_unlock(&dev->struct_mutex);
c8afe684c95cd17 Rob Clark 2013-06-26 139 drm_framebuffer_remove(fb);
c8afe684c95cd17 Rob Clark 2013-06-26 140 return ret;
c8afe684c95cd17 Rob Clark 2013-06-26 141 }
c8afe684c95cd17 Rob Clark 2013-06-26 142
:::::: The code at line 121 was first introduced by commit
:::::: 38958bab824a7955138c356a16a3f72562fbcef1 drm/msm: don't track fbdev's gem object separately
:::::: TO: Rob Clark <robdclark@...il.com>
:::::: CC: Rob Clark <robdclark@...il.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (38092 bytes)
Powered by blists - more mailing lists