linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: kbuild-all@01.org, dri-devel@lists.freedesktop.org,
	Tomeu Vizoso <tomeu.vizoso@collabora.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	David Airlie <airlied@linux.ie>, Jason Wang <jasowang@redhat.com>,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH] drm/virtio: Add window server support
Date: Sat, 16 Dec 2017 08:58:19 +0800	[thread overview]
Message-ID: <201712160810.J7N39iPX%fengguang.wu@intel.com> (raw)
In-Reply-To: <20171214124323.10139-1-tomeu.vizoso@collabora.com>

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

Hi Tomeu,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.15-rc3]
[cannot apply to drm/drm-next drm-exynos/exynos-drm/for-next next-20171215]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Tomeu-Vizoso/drm-virtio-Add-window-server-support/20171216-081939
config: i386-randconfig-x002-201750 (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
                    from include/linux/list.h:9,
                    from include/linux/wait.h:7,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:6,
                    from include/uapi/linux/aio_abi.h:31,
                    from include/linux/syscalls.h:72,
                    from drivers/gpu/drm/virtio/virtgpu_ioctl.c:29:
   drivers/gpu/drm/virtio/virtgpu_ioctl.c: In function 'winsrv_ioctl_rx':
   drivers/gpu/drm/virtio/virtgpu_ioctl.c:562:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      if (copy_to_user((void *)cmd->data + read_count,
                       ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:562:3: note: in expansion of macro 'if'
      if (copy_to_user((void *)cmd->data + read_count,
      ^~
   drivers/gpu/drm/virtio/virtgpu_ioctl.c:562:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      if (copy_to_user((void *)cmd->data + read_count,
                       ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^~~~
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:562:3: note: in expansion of macro 'if'
      if (copy_to_user((void *)cmd->data + read_count,
      ^~
   drivers/gpu/drm/virtio/virtgpu_ioctl.c:562:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      if (copy_to_user((void *)cmd->data + read_count,
                       ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^~~~
>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:562:3: note: in expansion of macro 'if'
      if (copy_to_user((void *)cmd->data + read_count,
      ^~
   drivers/gpu/drm/virtio/virtgpu_ioctl.c: In function 'winsrv_ioctl':
   drivers/gpu/drm/virtio/virtgpu_ioctl.c:615:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
        (const char __user *) winsrv_cmd.data,
        ^

vim +/if +562 drivers/gpu/drm/virtio/virtgpu_ioctl.c

   547	
   548	static int winsrv_ioctl_rx(struct virtio_gpu_device *vgdev,
   549				   struct virtio_gpu_winsrv_conn *conn,
   550				   struct drm_virtgpu_winsrv *cmd)
   551	{
   552		struct virtio_gpu_winsrv_rx_qentry *qentry, *tmp;
   553		struct virtio_gpu_winsrv_rx *virtio_cmd;
   554		int available_len = cmd->len;
   555		int read_count = 0;
   556	
   557		list_for_each_entry_safe(qentry, tmp, &conn->cmdq, next) {
   558			virtio_cmd = qentry->cmd;
   559			if (virtio_cmd->len > available_len)
   560				return 0;
   561	
 > 562			if (copy_to_user((void *)cmd->data + read_count,
   563					 virtio_cmd->data,
   564					 virtio_cmd->len)) {
   565				/* return error unless we have some data to return */
   566				if (read_count == 0)
   567					return -EFAULT;
   568			}
   569	
   570			/*
   571			 * here we could export resource IDs to FDs, but no protocol
   572			 * as of today requires it
   573			 */
   574	
   575			available_len -= virtio_cmd->len;
   576			read_count += virtio_cmd->len;
   577	
   578			virtio_gpu_queue_winsrv_rx_in(vgdev, virtio_cmd);
   579	
   580			list_del(&qentry->next);
   581			kfree(qentry);
   582		}
   583	
   584		cmd->len = read_count;
   585	
   586		return 0;
   587	}
   588	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 27343 bytes --]

  parent reply	other threads:[~2017-12-16  0:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-14 12:43 [PATCH] drm/virtio: Add window server support Tomeu Vizoso
2017-12-16  0:50 ` kbuild test robot
2017-12-16  0:58 ` kbuild test robot [this message]
2017-12-28 11:53 Tomeu Vizoso
2018-01-09 12:56 ` Tomeu Vizoso
2018-01-12  4:11 ` Dave Airlie
2018-01-12  7:59   ` Tomeu Vizoso

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=201712160810.J7N39iPX%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jasowang@redhat.com \
    --cc=kbuild-all@01.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=tomeu.vizoso@collabora.com \
    --cc=virtualization@lists.linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).