Re: [PATCH 1/1] drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl

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

 



Hi Julia,

kernel test robot noticed the following build warnings:

[auto build test WARNING on v6.7-rc6]
[also build test WARNING on linus/master]
[cannot apply to drm-misc/drm-misc-next drm/drm-next next-20231222]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Julia-Zhang/drm-virtio-Implement-RESOURCE_GET_LAYOUT-ioctl/20231222-182142
base:   v6.7-rc6
patch link:    https://lore.kernel.org/r/20231221100016.4022353-2-julia.zhang%40amd.com
patch subject: [PATCH 1/1] drm/virtio: Implement RESOURCE_GET_LAYOUT ioctl
config: i386-randconfig-004-20231225 (https://download.01.org/0day-ci/archive/20231225/202312250806.sVSnK275-lkp@xxxxxxxxx/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231225/202312250806.sVSnK275-lkp@xxxxxxxxx/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312250806.sVSnK275-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/virtio/virtgpu_ioctl.c:712:1: warning: unused label 'valid' [-Wunused-label]
   valid:
   ^~~~~~
   1 warning generated.


vim +/valid +712 drivers/gpu/drm/virtio/virtgpu_ioctl.c

   673	
   674	static int virtio_gpu_resource_query_layout_ioctl(struct drm_device *dev,
   675							  void *data,
   676							  struct drm_file *file)
   677	{
   678		struct drm_virtgpu_resource_query_layout *args = data;
   679		struct virtio_gpu_device *vgdev = dev->dev_private;
   680		struct drm_gem_object *obj = NULL;
   681		struct virtio_gpu_object *bo = NULL;
   682		struct virtio_gpu_query_info bo_info = {0};
   683		int ret = 0;
   684		int i;
   685	
   686		if (!vgdev->has_resource_query_layout) {
   687			DRM_ERROR("failing: no RQL on host\n");
   688			return -EINVAL;
   689		}
   690	
   691		if (args->handle > 0) {
   692			obj = drm_gem_object_lookup(file, args->handle);
   693			if (obj == NULL) {
   694				DRM_ERROR("invalid handle 0x%x\n", args->handle);
   695				return -ENOENT;
   696			}
   697			bo = gem_to_virtio_gpu_obj(obj);
   698		}
   699	
   700		ret = virtio_gpu_cmd_get_resource_layout(vgdev, &bo_info, args->width,
   701							 args->height, args->format,
   702							 args->bind, bo ? bo->hw_res_handle : 0);
   703		if (ret)
   704			goto out;
   705	
   706		ret = wait_event_timeout(vgdev->resp_wq,
   707					 atomic_read(&bo_info.is_valid),
   708					 5 * HZ);
   709		if (!ret)
   710			goto out;
   711	
 > 712	valid:
   713		smp_rmb();
   714		WARN_ON(atomic_read(&bo_info.is_valid));
   715		args->num_planes = bo_info.num_planes;
   716		args->modifier = bo_info.modifier;
   717		for (i = 0; i < args->num_planes; i++) {
   718			args->planes[i].offset = bo_info.planes[i].offset;
   719			args->planes[i].stride = bo_info.planes[i].stride;
   720		}
   721		for (; i < VIRTIO_GPU_MAX_RESOURCE_PLANES; i++) {
   722			args->planes[i].offset = 0;
   723			args->planes[i].stride = 0;
   724		}
   725		ret = 0;
   726	
   727	out:
   728		if (obj)
   729			drm_gem_object_put(obj);
   730		return ret;
   731	}
   732	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki



[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