[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202008090827.NZLsZv82%lkp@intel.com>
Date: Sun, 9 Aug 2020 08:51:47 +0800
From: kernel test robot <lkp@...el.com>
To: Stephen Boyd <sboyd@...nel.org>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nel.org>, Arnd Bergmann <arnd@...db.de>
Subject: drivers/gpu/drm/armada/armada_fbdev.c:85:27: sparse: got void
Documentation Kbuild Kconfig Makefile certs drivers fs include samples
scripts sound tools ptr
Hi Stephen,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk framework to be selectable
date: 3 months ago
config: arm-randconfig-s031-20200809 (attached as .config)
compiler: arm-linux-gnueabi-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-118-ge1578773-dirty
git checkout bbd7ffdbef6888459f301c5889f3b14ada38b913
# 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=arm
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/armada/armada_fbdev.c:85:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] <asn:2> *screen_base @@ got void *[assigned] ptr @@
drivers/gpu/drm/armada/armada_fbdev.c:85:27: sparse: expected char [noderef] <asn:2> *screen_base
>> drivers/gpu/drm/armada/armada_fbdev.c:85:27: sparse: got void *[assigned] ptr
--
drivers/gpu/drm/armada/armada_gem.c:61:37: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] <asn:2> *iomem_cookie @@ got void *addr @@
drivers/gpu/drm/armada/armada_gem.c:61:37: sparse: expected void volatile [noderef] <asn:2> *iomem_cookie
>> drivers/gpu/drm/armada/armada_gem.c:61:37: sparse: got void *addr
drivers/gpu/drm/armada/armada_gem.c:183:28: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void *addr @@ got void [noderef] <asn:2> * @@
>> drivers/gpu/drm/armada/armada_gem.c:183:28: sparse: expected void *addr
drivers/gpu/drm/armada/armada_gem.c:183:28: sparse: got void [noderef] <asn:2> *
--
>> drivers/gpu/drm/armada/armada_overlay.c:328:24: sparse: sparse: symbol 'armada_overlay_duplicate_state' was not declared. Should it be static?
vim +85 drivers/gpu/drm/armada/armada_fbdev.c
96f60e37dc6609 Russell King 2012-08-15 26
3382a6b999415d Russell King 2018-07-30 27 static int armada_fbdev_create(struct drm_fb_helper *fbh,
96f60e37dc6609 Russell King 2012-08-15 28 struct drm_fb_helper_surface_size *sizes)
96f60e37dc6609 Russell King 2012-08-15 29 {
96f60e37dc6609 Russell King 2012-08-15 30 struct drm_device *dev = fbh->dev;
96f60e37dc6609 Russell King 2012-08-15 31 struct drm_mode_fb_cmd2 mode;
96f60e37dc6609 Russell King 2012-08-15 32 struct armada_framebuffer *dfb;
96f60e37dc6609 Russell King 2012-08-15 33 struct armada_gem_object *obj;
96f60e37dc6609 Russell King 2012-08-15 34 struct fb_info *info;
96f60e37dc6609 Russell King 2012-08-15 35 int size, ret;
96f60e37dc6609 Russell King 2012-08-15 36 void *ptr;
96f60e37dc6609 Russell King 2012-08-15 37
96f60e37dc6609 Russell King 2012-08-15 38 memset(&mode, 0, sizeof(mode));
96f60e37dc6609 Russell King 2012-08-15 39 mode.width = sizes->surface_width;
96f60e37dc6609 Russell King 2012-08-15 40 mode.height = sizes->surface_height;
96f60e37dc6609 Russell King 2012-08-15 41 mode.pitches[0] = armada_pitch(mode.width, sizes->surface_bpp);
96f60e37dc6609 Russell King 2012-08-15 42 mode.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
96f60e37dc6609 Russell King 2012-08-15 43 sizes->surface_depth);
96f60e37dc6609 Russell King 2012-08-15 44
96f60e37dc6609 Russell King 2012-08-15 45 size = mode.pitches[0] * mode.height;
96f60e37dc6609 Russell King 2012-08-15 46 obj = armada_gem_alloc_private_object(dev, size);
96f60e37dc6609 Russell King 2012-08-15 47 if (!obj) {
96f60e37dc6609 Russell King 2012-08-15 48 DRM_ERROR("failed to allocate fb memory\n");
96f60e37dc6609 Russell King 2012-08-15 49 return -ENOMEM;
96f60e37dc6609 Russell King 2012-08-15 50 }
96f60e37dc6609 Russell King 2012-08-15 51
96f60e37dc6609 Russell King 2012-08-15 52 ret = armada_gem_linear_back(dev, obj);
96f60e37dc6609 Russell King 2012-08-15 53 if (ret) {
4c3cf375bc4042 Haneen Mohammed 2017-09-20 54 drm_gem_object_put_unlocked(&obj->obj);
96f60e37dc6609 Russell King 2012-08-15 55 return ret;
96f60e37dc6609 Russell King 2012-08-15 56 }
96f60e37dc6609 Russell King 2012-08-15 57
96f60e37dc6609 Russell King 2012-08-15 58 ptr = armada_gem_map_object(dev, obj);
96f60e37dc6609 Russell King 2012-08-15 59 if (!ptr) {
4c3cf375bc4042 Haneen Mohammed 2017-09-20 60 drm_gem_object_put_unlocked(&obj->obj);
96f60e37dc6609 Russell King 2012-08-15 61 return -ENOMEM;
96f60e37dc6609 Russell King 2012-08-15 62 }
96f60e37dc6609 Russell King 2012-08-15 63
96f60e37dc6609 Russell King 2012-08-15 64 dfb = armada_framebuffer_create(dev, &mode, obj);
96f60e37dc6609 Russell King 2012-08-15 65
96f60e37dc6609 Russell King 2012-08-15 66 /*
96f60e37dc6609 Russell King 2012-08-15 67 * A reference is now held by the framebuffer object if
96f60e37dc6609 Russell King 2012-08-15 68 * successful, otherwise this drops the ref for the error path.
96f60e37dc6609 Russell King 2012-08-15 69 */
4c3cf375bc4042 Haneen Mohammed 2017-09-20 70 drm_gem_object_put_unlocked(&obj->obj);
96f60e37dc6609 Russell King 2012-08-15 71
96f60e37dc6609 Russell King 2012-08-15 72 if (IS_ERR(dfb))
96f60e37dc6609 Russell King 2012-08-15 73 return PTR_ERR(dfb);
96f60e37dc6609 Russell King 2012-08-15 74
e8b70e4dd7b5da Archit Taneja 2015-07-22 75 info = drm_fb_helper_alloc_fbi(fbh);
e8b70e4dd7b5da Archit Taneja 2015-07-22 76 if (IS_ERR(info)) {
e8b70e4dd7b5da Archit Taneja 2015-07-22 77 ret = PTR_ERR(info);
96f60e37dc6609 Russell King 2012-08-15 78 goto err_fballoc;
96f60e37dc6609 Russell King 2012-08-15 79 }
96f60e37dc6609 Russell King 2012-08-15 80
96f60e37dc6609 Russell King 2012-08-15 81 info->fbops = &armada_fb_ops;
96f60e37dc6609 Russell King 2012-08-15 82 info->fix.smem_start = obj->phys_addr;
96f60e37dc6609 Russell King 2012-08-15 83 info->fix.smem_len = obj->obj.size;
96f60e37dc6609 Russell King 2012-08-15 84 info->screen_size = obj->obj.size;
96f60e37dc6609 Russell King 2012-08-15 @85 info->screen_base = ptr;
96f60e37dc6609 Russell King 2012-08-15 86 fbh->fb = &dfb->fb;
e8b70e4dd7b5da Archit Taneja 2015-07-22 87
f21b6e47eb1dd0 Daniel Vetter 2019-03-26 88 drm_fb_helper_fill_info(info, fbh, sizes);
96f60e37dc6609 Russell King 2012-08-15 89
7513e09596374b Russell King 2013-11-27 90 DRM_DEBUG_KMS("allocated %dx%d %dbpp fb: 0x%08llx\n",
272725c7db4da1 Ville Syrjälä 2016-12-14 91 dfb->fb.width, dfb->fb.height, dfb->fb.format->cpp[0] * 8,
7513e09596374b Russell King 2013-11-27 92 (unsigned long long)obj->phys_addr);
96f60e37dc6609 Russell King 2012-08-15 93
96f60e37dc6609 Russell King 2012-08-15 94 return 0;
96f60e37dc6609 Russell King 2012-08-15 95
96f60e37dc6609 Russell King 2012-08-15 96 err_fballoc:
96f60e37dc6609 Russell King 2012-08-15 97 dfb->fb.funcs->destroy(&dfb->fb);
96f60e37dc6609 Russell King 2012-08-15 98 return ret;
96f60e37dc6609 Russell King 2012-08-15 99 }
96f60e37dc6609 Russell King 2012-08-15 100
:::::: The code at line 85 was first introduced by commit
:::::: 96f60e37dc66091bde8d5de136ff6fda09f2d799 DRM: Armada: Add Armada DRM driver
:::::: TO: Russell King <rmk+kernel@....linux.org.uk>
:::::: CC: Russell King <rmk+kernel@....linux.org.uk>
---
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" (33097 bytes)
Powered by blists - more mailing lists