[drm-tip:drm-tip 3/9] drivers/gpu/drm/virtio/virtgpu_prime.c:31:17: sparse: the previous one is here

kbuild test robot lkp at intel.com
Wed Apr 24 12:19:26 UTC 2019


tree:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
head:   575436c338f413c032e3accde7933e67f44261fb
commit: 3a6142185c17293159dec428c56f7f1f0ec53f61 [3/9] Merge remote-tracking branch 'drm/drm-next' into drm-tip
reproduce:
        # apt-get install sparse
        git checkout 3a6142185c17293159dec428c56f7f1f0ec53f61
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>

sparse warnings: (new ones prefixed by >>)

   drivers/gpu/drm/virtio/virtgpu_prime.c:43:17: sparse: sparse: multiple definitions for function 'virtgpu_gem_prime_get_sg_table'
>> drivers/gpu/drm/virtio/virtgpu_prime.c:31:17: sparse:  the previous one is here

vim +31 drivers/gpu/drm/virtio/virtgpu_prime.c

11a8f280 Dave Airlie      2015-01-23  26  
11a8f280 Dave Airlie      2015-01-23  27  /* Empty Implementations as there should not be any other driver for a virtual
5d883850 Rodrigo Siqueira 2018-02-22  28   * device that might share buffers with virtgpu
5d883850 Rodrigo Siqueira 2018-02-22  29   */
11a8f280 Dave Airlie      2015-01-23  30  
98f41dc3 Gerd Hoffmann    2019-02-27 @31  struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
11a8f280 Dave Airlie      2015-01-23  32  {
98f41dc3 Gerd Hoffmann    2019-02-27  33  	struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);
11a8f280 Dave Airlie      2015-01-23  34  
98f41dc3 Gerd Hoffmann    2019-02-27  35  	if (!bo->tbo.ttm->pages || !bo->tbo.ttm->num_pages)
98f41dc3 Gerd Hoffmann    2019-02-27  36  		/* should not happen */
98f41dc3 Gerd Hoffmann    2019-02-27  37  		return ERR_PTR(-EINVAL);
98f41dc3 Gerd Hoffmann    2019-02-27  38  
98f41dc3 Gerd Hoffmann    2019-02-27  39  	return drm_prime_pages_to_sg(bo->tbo.ttm->pages,
98f41dc3 Gerd Hoffmann    2019-02-27  40  				     bo->tbo.ttm->num_pages);
11a8f280 Dave Airlie      2015-01-23  41  }
11a8f280 Dave Airlie      2015-01-23  42  
a0cecc23 Dave Airlie      2019-04-24 @43  struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
a0cecc23 Dave Airlie      2019-04-24  44  {
a0cecc23 Dave Airlie      2019-04-24  45  	return ERR_PTR(-ENODEV);
a0cecc23 Dave Airlie      2019-04-24  46  }
a0cecc23 Dave Airlie      2019-04-24  47  

:::::: The code at line 31 was first introduced by commit
:::::: 98f41dc3b3eeabfc80d5d5eb1c1a6294ff59b4ec drm/virtio: implement prime export

:::::: TO: Gerd Hoffmann <kraxel at redhat.com>
:::::: CC: Gerd Hoffmann <kraxel at redhat.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation


More information about the dri-devel mailing list