From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Fri, 17 Jul 2020 16:53:27 +0800 [thread overview]
Message-ID: <202007171624.FDsiPBuz%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7921 bytes --]
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@intel.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@gmail.com>
:::::: CC: Rob Clark <robdclark@gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38092 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: sparse: incorrect type in assignment (different address spaces)
Date: Fri, 17 Jul 2020 16:53:27 +0800 [thread overview]
Message-ID: <202007171624.FDsiPBuz%lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 7798 bytes --]
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@intel.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@gmail.com>
:::::: CC: Rob Clark <robdclark@gmail.com>
---
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: 38092 bytes --]
next reply other threads:[~2020-07-17 8:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 8:53 kernel test robot [this message]
2020-07-17 8:53 ` drivers/gpu/drm/msm/msm_fbdev.c:121:26: sparse: sparse: incorrect type in assignment (different address spaces) kernel test robot
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=202007171624.FDsiPBuz%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.