All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [kraxel:drm-qemu-next 7/7] drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:29: sparse: sparse: incorrect type in argument 3 (different base types)
Date: Wed, 23 Oct 2019 03:08:44 +0800	[thread overview]
Message-ID: <201910230335.3RVGmvQB%lkp@intel.com> (raw)

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

tree:   git://git.kraxel.org/linux drm-qemu-next
head:   64f1cc99ef96cc944c69828c67c33a97d26b48e0
commit: 64f1cc99ef96cc944c69828c67c33a97d26b48e0 [7/7] drm/virtio: move byteorder handling into virtio_gpu_cmd_transfer_to_host_2d function
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-dirty
        git checkout 64f1cc99ef96cc944c69828c67c33a97d26b48e0
        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@intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:29: sparse: sparse: incorrect type in argument 3 (different base types) @@    expected unsigned int [usertype] width @@    got restricted __le32 [unsigned int [usertype] width @@
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:29: sparse:    expected unsigned int [usertype] width
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:29: sparse:    got restricted __le32 [addressable] [usertype] w
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:36: sparse: sparse: incorrect type in argument 4 (different base types) @@    expected unsigned int [usertype] height @@    got restricted __le32 [unsigned int [usertype] height @@
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:36: sparse:    expected unsigned int [usertype] height
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:36: sparse:    got restricted __le32 [addressable] [usertype] h
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:43: sparse: sparse: incorrect type in argument 5 (different base types) @@    expected unsigned int [usertype] x @@    got restricted __le32 [unsigned int [usertype] x @@
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:43: sparse:    expected unsigned int [usertype] x
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:43: sparse:    got restricted __le32 [addressable] [usertype] x
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:50: sparse: sparse: incorrect type in argument 6 (different base types) @@    expected unsigned int [usertype] y @@    got restricted __le32 [unsigned int [usertype] y @@
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:50: sparse:    expected unsigned int [usertype] y
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:360:50: sparse:    got restricted __le32 [addressable] [usertype] y

vim +360 drivers/gpu/drm/virtio/virtgpu_ioctl.c

62fb7a5e10962a Gerd Hoffmann 2014-10-28  339  
62fb7a5e10962a Gerd Hoffmann 2014-10-28  340  static int virtio_gpu_transfer_to_host_ioctl(struct drm_device *dev, void *data,
62fb7a5e10962a Gerd Hoffmann 2014-10-28  341  					     struct drm_file *file)
62fb7a5e10962a Gerd Hoffmann 2014-10-28  342  {
62fb7a5e10962a Gerd Hoffmann 2014-10-28  343  	struct virtio_gpu_device *vgdev = dev->dev_private;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  344  	struct virtio_gpu_fpriv *vfpriv = file->driver_priv;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  345  	struct drm_virtgpu_3d_transfer_to_host *args = data;
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  346  	struct virtio_gpu_object_array *objs;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  347  	struct virtio_gpu_fence *fence;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  348  	struct virtio_gpu_box box;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  349  	int ret;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  350  	u32 offset = args->offset;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  351  
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  352  	objs = virtio_gpu_array_from_handles(file, &args->bo_handle, 1);
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  353  	if (objs == NULL)
62fb7a5e10962a Gerd Hoffmann 2014-10-28  354  		return -ENOENT;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  355  
62fb7a5e10962a Gerd Hoffmann 2014-10-28  356  	convert_to_hw_box(&box, &args->box);
62fb7a5e10962a Gerd Hoffmann 2014-10-28  357  	if (!vgdev->has_virgl_3d) {
62fb7a5e10962a Gerd Hoffmann 2014-10-28  358  		virtio_gpu_cmd_transfer_to_host_2d
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  359  			(vgdev, offset,
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29 @360  			 box.w, box.h, box.x, box.y,
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  361  			 objs, NULL);
62fb7a5e10962a Gerd Hoffmann 2014-10-28  362  	} else {
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  363  		ret = virtio_gpu_array_lock_resv(objs);
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  364  		if (ret != 0)
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  365  			goto err_put_free;
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  366  
9fdd90c0f42440 Robert Foss   2018-11-12  367  		ret = -ENOMEM;
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  368  		fence = virtio_gpu_fence_alloc(vgdev);
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  369  		if (!fence)
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  370  			goto err_unlock;
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  371  
62fb7a5e10962a Gerd Hoffmann 2014-10-28  372  		virtio_gpu_cmd_transfer_to_host_3d
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  373  			(vgdev,
62fb7a5e10962a Gerd Hoffmann 2014-10-28  374  			 vfpriv ? vfpriv->ctx_id : 0, offset,
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  375  			 args->level, &box, objs, fence);
f54d1867005c33 Chris Wilson  2016-10-25  376  		dma_fence_put(&fence->f);
62fb7a5e10962a Gerd Hoffmann 2014-10-28  377  	}
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  378  	return 0;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  379  
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  380  err_unlock:
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  381  	virtio_gpu_array_unlock_resv(objs);
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  382  err_put_free:
3d3bdbc0bdbd94 Gerd Hoffmann 2019-08-29  383  	virtio_gpu_array_put_free(objs);
62fb7a5e10962a Gerd Hoffmann 2014-10-28  384  	return ret;
62fb7a5e10962a Gerd Hoffmann 2014-10-28  385  }
62fb7a5e10962a Gerd Hoffmann 2014-10-28  386  

:::::: The code at line 360 was first introduced by commit
:::::: 3d3bdbc0bdbd9497751f9e305fba223d7a77dc9c drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing

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

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

                 reply	other threads:[~2019-10-22 19:08 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=201910230335.3RVGmvQB%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.