Re: [PATCH] drm/virtio: Add window server support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-x016-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 >>):

   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,
                       ^
   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 +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: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux