All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maksym Wezdecki <maksym.wezdecki@collabora.com>,
	David Airlie <airlied@linux.ie>,
	Gerd Hoffmann <kraxel@redhat.com>
Cc: mwezdeck <maksym.wezdecki@collabora.co.uk>,
	llvm@lists.linux.dev, kbuild-all@lists.01.org,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] drm/virtio: delay pinning the pages till first use
Date: Thu, 4 Nov 2021 20:44:40 +0800	[thread overview]
Message-ID: <202111042001.BBwFIQmU-lkp@intel.com> (raw)
In-Reply-To: <20211102113139.154140-1-maksym.wezdecki@collabora.com>

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

Hi Maksym,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on next-20211104]
[cannot apply to v5.15]
[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]

url:    https://github.com/0day-ci/linux/commits/Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: i386-buildonly-randconfig-r002-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 264d3b6d4e08401c5b50a85bd76e80b3461d77e6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1795d2fd78a334a37a02dba76ac1e314cf122467
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
        git checkout 1795d2fd78a334a37a02dba76ac1e314cf122467
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/virtio/virtgpu_object.c:254:11: error: variable 'ents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                       ^~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:219:35: note: initialize the variable 'ents' to silence this warning
           struct virtio_gpu_mem_entry *ents;
                                            ^
                                             = NULL
>> drivers/gpu/drm/virtio/virtgpu_object.c:254:17: error: variable 'nents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                             ^~~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:220:20: note: initialize the variable 'nents' to silence this warning
           unsigned int nents;
                             ^
                              = 0
   2 errors generated.


vim +/ents +254 drivers/gpu/drm/virtio/virtgpu_object.c

2f2aa13724d568 Gerd Hoffmann   2020-02-07  210  
dc5698e80cf724 Dave Airlie     2013-09-09  211  int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
4441235f9566e6 Gerd Hoffmann   2019-03-18  212  			     struct virtio_gpu_object_params *params,
530b28426a94b8 Gerd Hoffmann   2019-03-18  213  			     struct virtio_gpu_object **bo_ptr,
530b28426a94b8 Gerd Hoffmann   2019-03-18  214  			     struct virtio_gpu_fence *fence)
dc5698e80cf724 Dave Airlie     2013-09-09  215  {
e2324300f427ff Gerd Hoffmann   2019-08-29  216  	struct virtio_gpu_object_array *objs = NULL;
c66df701e783bc Gerd Hoffmann   2019-08-29  217  	struct drm_gem_shmem_object *shmem_obj;
dc5698e80cf724 Dave Airlie     2013-09-09  218  	struct virtio_gpu_object *bo;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  219  	struct virtio_gpu_mem_entry *ents;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  220  	unsigned int nents;
dc5698e80cf724 Dave Airlie     2013-09-09  221  	int ret;
dc5698e80cf724 Dave Airlie     2013-09-09  222  
dc5698e80cf724 Dave Airlie     2013-09-09  223  	*bo_ptr = NULL;
dc5698e80cf724 Dave Airlie     2013-09-09  224  
c66df701e783bc Gerd Hoffmann   2019-08-29  225  	params->size = roundup(params->size, PAGE_SIZE);
c66df701e783bc Gerd Hoffmann   2019-08-29  226  	shmem_obj = drm_gem_shmem_create(vgdev->ddev, params->size);
c66df701e783bc Gerd Hoffmann   2019-08-29  227  	if (IS_ERR(shmem_obj))
c66df701e783bc Gerd Hoffmann   2019-08-29  228  		return PTR_ERR(shmem_obj);
c66df701e783bc Gerd Hoffmann   2019-08-29  229  	bo = gem_to_virtio_gpu_obj(&shmem_obj->base);
dc5698e80cf724 Dave Airlie     2013-09-09  230  
556c62e85f9b97 Matthew Wilcox  2018-10-30  231  	ret = virtio_gpu_resource_id_get(vgdev, &bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  232  	if (ret < 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  233  		goto err_free_gem;
e2324300f427ff Gerd Hoffmann   2019-08-29  234  
530b28426a94b8 Gerd Hoffmann   2019-03-18  235  	bo->dumb = params->dumb;
530b28426a94b8 Gerd Hoffmann   2019-03-18  236  
e2324300f427ff Gerd Hoffmann   2019-08-29  237  	if (fence) {
e2324300f427ff Gerd Hoffmann   2019-08-29  238  		ret = -ENOMEM;
e2324300f427ff Gerd Hoffmann   2019-08-29  239  		objs = virtio_gpu_array_alloc(1);
e2324300f427ff Gerd Hoffmann   2019-08-29  240  		if (!objs)
e2324300f427ff Gerd Hoffmann   2019-08-29  241  			goto err_put_id;
c66df701e783bc Gerd Hoffmann   2019-08-29  242  		virtio_gpu_array_add_obj(objs, &bo->base.base);
e2324300f427ff Gerd Hoffmann   2019-08-29  243  
e2324300f427ff Gerd Hoffmann   2019-08-29  244  		ret = virtio_gpu_array_lock_resv(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  245  		if (ret != 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  246  			goto err_put_objs;
e2324300f427ff Gerd Hoffmann   2019-08-29  247  	}
e2324300f427ff Gerd Hoffmann   2019-08-29  248  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  249  	if (params->blob) {
3389082bb98296 Vivek Kasireddy 2021-04-12  250  		if (params->blob_mem == VIRTGPU_BLOB_MEM_GUEST)
3389082bb98296 Vivek Kasireddy 2021-04-12  251  			bo->guest_blob = true;
3389082bb98296 Vivek Kasireddy 2021-04-12  252  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  253  		virtio_gpu_cmd_resource_create_blob(vgdev, bo, params,
897b4d1acaf563 Gerd Hoffmann   2020-09-23 @254  						    ents, nents);
897b4d1acaf563 Gerd Hoffmann   2020-09-23  255  	} else if (params->virgl) {
30172efbfb842c Gurchetan Singh 2020-09-23  256  		virtio_gpu_cmd_resource_create_3d(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  257  						  objs, fence);
30172efbfb842c Gurchetan Singh 2020-09-23  258  	} else {
1795d2fd78a334 mwezdeck        2021-11-02  259  		ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents);
1795d2fd78a334 mwezdeck        2021-11-02  260  		if (ret != 0) {
1795d2fd78a334 mwezdeck        2021-11-02  261  			virtio_gpu_array_put_free(objs);
1795d2fd78a334 mwezdeck        2021-11-02  262  			virtio_gpu_free_object(&shmem_obj->base);
1795d2fd78a334 mwezdeck        2021-11-02  263  			return ret;
1795d2fd78a334 mwezdeck        2021-11-02  264  		}
30172efbfb842c Gurchetan Singh 2020-09-23  265  		virtio_gpu_cmd_create_resource(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  266  					       objs, fence);
c76d4ab764adae Gurchetan Singh 2020-04-01  267  		virtio_gpu_object_attach(vgdev, bo, ents, nents);
30172efbfb842c Gurchetan Singh 2020-09-23  268  	}
dc5698e80cf724 Dave Airlie     2013-09-09  269  
dc5698e80cf724 Dave Airlie     2013-09-09  270  	*bo_ptr = bo;
dc5698e80cf724 Dave Airlie     2013-09-09  271  	return 0;
e2324300f427ff Gerd Hoffmann   2019-08-29  272  
e2324300f427ff Gerd Hoffmann   2019-08-29  273  err_put_objs:
e2324300f427ff Gerd Hoffmann   2019-08-29  274  	virtio_gpu_array_put_free(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  275  err_put_id:
e2324300f427ff Gerd Hoffmann   2019-08-29  276  	virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  277  err_free_gem:
c66df701e783bc Gerd Hoffmann   2019-08-29  278  	drm_gem_shmem_free_object(&shmem_obj->base);
e2324300f427ff Gerd Hoffmann   2019-08-29  279  	return ret;
dc5698e80cf724 Dave Airlie     2013-09-09  280  }
1795d2fd78a334 mwezdeck        2021-11-02  281  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

[-- Attachment #3: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Maksym Wezdecki <maksym.wezdecki@collabora.com>,
	David Airlie <airlied@linux.ie>,
	Gerd Hoffmann <kraxel@redhat.com>
Cc: mwezdeck <maksym.wezdecki@collabora.co.uk>,
	llvm@lists.linux.dev, kbuild-all@lists.01.org,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] drm/virtio: delay pinning the pages till first use
Date: Thu, 4 Nov 2021 20:44:40 +0800	[thread overview]
Message-ID: <202111042001.BBwFIQmU-lkp@intel.com> (raw)
In-Reply-To: <20211102113139.154140-1-maksym.wezdecki@collabora.com>

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

Hi Maksym,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on next-20211104]
[cannot apply to v5.15]
[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]

url:    https://github.com/0day-ci/linux/commits/Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: i386-buildonly-randconfig-r002-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 264d3b6d4e08401c5b50a85bd76e80b3461d77e6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1795d2fd78a334a37a02dba76ac1e314cf122467
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
        git checkout 1795d2fd78a334a37a02dba76ac1e314cf122467
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/virtio/virtgpu_object.c:254:11: error: variable 'ents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                       ^~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:219:35: note: initialize the variable 'ents' to silence this warning
           struct virtio_gpu_mem_entry *ents;
                                            ^
                                             = NULL
>> drivers/gpu/drm/virtio/virtgpu_object.c:254:17: error: variable 'nents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                             ^~~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:220:20: note: initialize the variable 'nents' to silence this warning
           unsigned int nents;
                             ^
                              = 0
   2 errors generated.


vim +/ents +254 drivers/gpu/drm/virtio/virtgpu_object.c

2f2aa13724d568 Gerd Hoffmann   2020-02-07  210  
dc5698e80cf724 Dave Airlie     2013-09-09  211  int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
4441235f9566e6 Gerd Hoffmann   2019-03-18  212  			     struct virtio_gpu_object_params *params,
530b28426a94b8 Gerd Hoffmann   2019-03-18  213  			     struct virtio_gpu_object **bo_ptr,
530b28426a94b8 Gerd Hoffmann   2019-03-18  214  			     struct virtio_gpu_fence *fence)
dc5698e80cf724 Dave Airlie     2013-09-09  215  {
e2324300f427ff Gerd Hoffmann   2019-08-29  216  	struct virtio_gpu_object_array *objs = NULL;
c66df701e783bc Gerd Hoffmann   2019-08-29  217  	struct drm_gem_shmem_object *shmem_obj;
dc5698e80cf724 Dave Airlie     2013-09-09  218  	struct virtio_gpu_object *bo;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  219  	struct virtio_gpu_mem_entry *ents;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  220  	unsigned int nents;
dc5698e80cf724 Dave Airlie     2013-09-09  221  	int ret;
dc5698e80cf724 Dave Airlie     2013-09-09  222  
dc5698e80cf724 Dave Airlie     2013-09-09  223  	*bo_ptr = NULL;
dc5698e80cf724 Dave Airlie     2013-09-09  224  
c66df701e783bc Gerd Hoffmann   2019-08-29  225  	params->size = roundup(params->size, PAGE_SIZE);
c66df701e783bc Gerd Hoffmann   2019-08-29  226  	shmem_obj = drm_gem_shmem_create(vgdev->ddev, params->size);
c66df701e783bc Gerd Hoffmann   2019-08-29  227  	if (IS_ERR(shmem_obj))
c66df701e783bc Gerd Hoffmann   2019-08-29  228  		return PTR_ERR(shmem_obj);
c66df701e783bc Gerd Hoffmann   2019-08-29  229  	bo = gem_to_virtio_gpu_obj(&shmem_obj->base);
dc5698e80cf724 Dave Airlie     2013-09-09  230  
556c62e85f9b97 Matthew Wilcox  2018-10-30  231  	ret = virtio_gpu_resource_id_get(vgdev, &bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  232  	if (ret < 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  233  		goto err_free_gem;
e2324300f427ff Gerd Hoffmann   2019-08-29  234  
530b28426a94b8 Gerd Hoffmann   2019-03-18  235  	bo->dumb = params->dumb;
530b28426a94b8 Gerd Hoffmann   2019-03-18  236  
e2324300f427ff Gerd Hoffmann   2019-08-29  237  	if (fence) {
e2324300f427ff Gerd Hoffmann   2019-08-29  238  		ret = -ENOMEM;
e2324300f427ff Gerd Hoffmann   2019-08-29  239  		objs = virtio_gpu_array_alloc(1);
e2324300f427ff Gerd Hoffmann   2019-08-29  240  		if (!objs)
e2324300f427ff Gerd Hoffmann   2019-08-29  241  			goto err_put_id;
c66df701e783bc Gerd Hoffmann   2019-08-29  242  		virtio_gpu_array_add_obj(objs, &bo->base.base);
e2324300f427ff Gerd Hoffmann   2019-08-29  243  
e2324300f427ff Gerd Hoffmann   2019-08-29  244  		ret = virtio_gpu_array_lock_resv(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  245  		if (ret != 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  246  			goto err_put_objs;
e2324300f427ff Gerd Hoffmann   2019-08-29  247  	}
e2324300f427ff Gerd Hoffmann   2019-08-29  248  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  249  	if (params->blob) {
3389082bb98296 Vivek Kasireddy 2021-04-12  250  		if (params->blob_mem == VIRTGPU_BLOB_MEM_GUEST)
3389082bb98296 Vivek Kasireddy 2021-04-12  251  			bo->guest_blob = true;
3389082bb98296 Vivek Kasireddy 2021-04-12  252  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  253  		virtio_gpu_cmd_resource_create_blob(vgdev, bo, params,
897b4d1acaf563 Gerd Hoffmann   2020-09-23 @254  						    ents, nents);
897b4d1acaf563 Gerd Hoffmann   2020-09-23  255  	} else if (params->virgl) {
30172efbfb842c Gurchetan Singh 2020-09-23  256  		virtio_gpu_cmd_resource_create_3d(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  257  						  objs, fence);
30172efbfb842c Gurchetan Singh 2020-09-23  258  	} else {
1795d2fd78a334 mwezdeck        2021-11-02  259  		ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents);
1795d2fd78a334 mwezdeck        2021-11-02  260  		if (ret != 0) {
1795d2fd78a334 mwezdeck        2021-11-02  261  			virtio_gpu_array_put_free(objs);
1795d2fd78a334 mwezdeck        2021-11-02  262  			virtio_gpu_free_object(&shmem_obj->base);
1795d2fd78a334 mwezdeck        2021-11-02  263  			return ret;
1795d2fd78a334 mwezdeck        2021-11-02  264  		}
30172efbfb842c Gurchetan Singh 2020-09-23  265  		virtio_gpu_cmd_create_resource(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  266  					       objs, fence);
c76d4ab764adae Gurchetan Singh 2020-04-01  267  		virtio_gpu_object_attach(vgdev, bo, ents, nents);
30172efbfb842c Gurchetan Singh 2020-09-23  268  	}
dc5698e80cf724 Dave Airlie     2013-09-09  269  
dc5698e80cf724 Dave Airlie     2013-09-09  270  	*bo_ptr = bo;
dc5698e80cf724 Dave Airlie     2013-09-09  271  	return 0;
e2324300f427ff Gerd Hoffmann   2019-08-29  272  
e2324300f427ff Gerd Hoffmann   2019-08-29  273  err_put_objs:
e2324300f427ff Gerd Hoffmann   2019-08-29  274  	virtio_gpu_array_put_free(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  275  err_put_id:
e2324300f427ff Gerd Hoffmann   2019-08-29  276  	virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  277  err_free_gem:
c66df701e783bc Gerd Hoffmann   2019-08-29  278  	drm_gem_shmem_free_object(&shmem_obj->base);
e2324300f427ff Gerd Hoffmann   2019-08-29  279  	return ret;
dc5698e80cf724 Dave Airlie     2013-09-09  280  }
1795d2fd78a334 mwezdeck        2021-11-02  281  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: Maksym Wezdecki <maksym.wezdecki@collabora.com>,
	David Airlie <airlied@linux.ie>,
	Gerd Hoffmann <kraxel@redhat.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	mwezdeck <maksym.wezdecki@collabora.co.uk>,
	dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] drm/virtio: delay pinning the pages till first use
Date: Thu, 4 Nov 2021 20:44:40 +0800	[thread overview]
Message-ID: <202111042001.BBwFIQmU-lkp@intel.com> (raw)
In-Reply-To: <20211102113139.154140-1-maksym.wezdecki@collabora.com>

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

Hi Maksym,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on next-20211104]
[cannot apply to v5.15]
[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]

url:    https://github.com/0day-ci/linux/commits/Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: i386-buildonly-randconfig-r002-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 264d3b6d4e08401c5b50a85bd76e80b3461d77e6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1795d2fd78a334a37a02dba76ac1e314cf122467
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
        git checkout 1795d2fd78a334a37a02dba76ac1e314cf122467
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/virtio/virtgpu_object.c:254:11: error: variable 'ents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                       ^~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:219:35: note: initialize the variable 'ents' to silence this warning
           struct virtio_gpu_mem_entry *ents;
                                            ^
                                             = NULL
>> drivers/gpu/drm/virtio/virtgpu_object.c:254:17: error: variable 'nents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                             ^~~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:220:20: note: initialize the variable 'nents' to silence this warning
           unsigned int nents;
                             ^
                              = 0
   2 errors generated.


vim +/ents +254 drivers/gpu/drm/virtio/virtgpu_object.c

2f2aa13724d568 Gerd Hoffmann   2020-02-07  210  
dc5698e80cf724 Dave Airlie     2013-09-09  211  int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
4441235f9566e6 Gerd Hoffmann   2019-03-18  212  			     struct virtio_gpu_object_params *params,
530b28426a94b8 Gerd Hoffmann   2019-03-18  213  			     struct virtio_gpu_object **bo_ptr,
530b28426a94b8 Gerd Hoffmann   2019-03-18  214  			     struct virtio_gpu_fence *fence)
dc5698e80cf724 Dave Airlie     2013-09-09  215  {
e2324300f427ff Gerd Hoffmann   2019-08-29  216  	struct virtio_gpu_object_array *objs = NULL;
c66df701e783bc Gerd Hoffmann   2019-08-29  217  	struct drm_gem_shmem_object *shmem_obj;
dc5698e80cf724 Dave Airlie     2013-09-09  218  	struct virtio_gpu_object *bo;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  219  	struct virtio_gpu_mem_entry *ents;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  220  	unsigned int nents;
dc5698e80cf724 Dave Airlie     2013-09-09  221  	int ret;
dc5698e80cf724 Dave Airlie     2013-09-09  222  
dc5698e80cf724 Dave Airlie     2013-09-09  223  	*bo_ptr = NULL;
dc5698e80cf724 Dave Airlie     2013-09-09  224  
c66df701e783bc Gerd Hoffmann   2019-08-29  225  	params->size = roundup(params->size, PAGE_SIZE);
c66df701e783bc Gerd Hoffmann   2019-08-29  226  	shmem_obj = drm_gem_shmem_create(vgdev->ddev, params->size);
c66df701e783bc Gerd Hoffmann   2019-08-29  227  	if (IS_ERR(shmem_obj))
c66df701e783bc Gerd Hoffmann   2019-08-29  228  		return PTR_ERR(shmem_obj);
c66df701e783bc Gerd Hoffmann   2019-08-29  229  	bo = gem_to_virtio_gpu_obj(&shmem_obj->base);
dc5698e80cf724 Dave Airlie     2013-09-09  230  
556c62e85f9b97 Matthew Wilcox  2018-10-30  231  	ret = virtio_gpu_resource_id_get(vgdev, &bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  232  	if (ret < 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  233  		goto err_free_gem;
e2324300f427ff Gerd Hoffmann   2019-08-29  234  
530b28426a94b8 Gerd Hoffmann   2019-03-18  235  	bo->dumb = params->dumb;
530b28426a94b8 Gerd Hoffmann   2019-03-18  236  
e2324300f427ff Gerd Hoffmann   2019-08-29  237  	if (fence) {
e2324300f427ff Gerd Hoffmann   2019-08-29  238  		ret = -ENOMEM;
e2324300f427ff Gerd Hoffmann   2019-08-29  239  		objs = virtio_gpu_array_alloc(1);
e2324300f427ff Gerd Hoffmann   2019-08-29  240  		if (!objs)
e2324300f427ff Gerd Hoffmann   2019-08-29  241  			goto err_put_id;
c66df701e783bc Gerd Hoffmann   2019-08-29  242  		virtio_gpu_array_add_obj(objs, &bo->base.base);
e2324300f427ff Gerd Hoffmann   2019-08-29  243  
e2324300f427ff Gerd Hoffmann   2019-08-29  244  		ret = virtio_gpu_array_lock_resv(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  245  		if (ret != 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  246  			goto err_put_objs;
e2324300f427ff Gerd Hoffmann   2019-08-29  247  	}
e2324300f427ff Gerd Hoffmann   2019-08-29  248  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  249  	if (params->blob) {
3389082bb98296 Vivek Kasireddy 2021-04-12  250  		if (params->blob_mem == VIRTGPU_BLOB_MEM_GUEST)
3389082bb98296 Vivek Kasireddy 2021-04-12  251  			bo->guest_blob = true;
3389082bb98296 Vivek Kasireddy 2021-04-12  252  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  253  		virtio_gpu_cmd_resource_create_blob(vgdev, bo, params,
897b4d1acaf563 Gerd Hoffmann   2020-09-23 @254  						    ents, nents);
897b4d1acaf563 Gerd Hoffmann   2020-09-23  255  	} else if (params->virgl) {
30172efbfb842c Gurchetan Singh 2020-09-23  256  		virtio_gpu_cmd_resource_create_3d(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  257  						  objs, fence);
30172efbfb842c Gurchetan Singh 2020-09-23  258  	} else {
1795d2fd78a334 mwezdeck        2021-11-02  259  		ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents);
1795d2fd78a334 mwezdeck        2021-11-02  260  		if (ret != 0) {
1795d2fd78a334 mwezdeck        2021-11-02  261  			virtio_gpu_array_put_free(objs);
1795d2fd78a334 mwezdeck        2021-11-02  262  			virtio_gpu_free_object(&shmem_obj->base);
1795d2fd78a334 mwezdeck        2021-11-02  263  			return ret;
1795d2fd78a334 mwezdeck        2021-11-02  264  		}
30172efbfb842c Gurchetan Singh 2020-09-23  265  		virtio_gpu_cmd_create_resource(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  266  					       objs, fence);
c76d4ab764adae Gurchetan Singh 2020-04-01  267  		virtio_gpu_object_attach(vgdev, bo, ents, nents);
30172efbfb842c Gurchetan Singh 2020-09-23  268  	}
dc5698e80cf724 Dave Airlie     2013-09-09  269  
dc5698e80cf724 Dave Airlie     2013-09-09  270  	*bo_ptr = bo;
dc5698e80cf724 Dave Airlie     2013-09-09  271  	return 0;
e2324300f427ff Gerd Hoffmann   2019-08-29  272  
e2324300f427ff Gerd Hoffmann   2019-08-29  273  err_put_objs:
e2324300f427ff Gerd Hoffmann   2019-08-29  274  	virtio_gpu_array_put_free(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  275  err_put_id:
e2324300f427ff Gerd Hoffmann   2019-08-29  276  	virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  277  err_free_gem:
c66df701e783bc Gerd Hoffmann   2019-08-29  278  	drm_gem_shmem_free_object(&shmem_obj->base);
e2324300f427ff Gerd Hoffmann   2019-08-29  279  	return ret;
dc5698e80cf724 Dave Airlie     2013-09-09  280  }
1795d2fd78a334 mwezdeck        2021-11-02  281  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] drm/virtio: delay pinning the pages till first use
Date: Thu, 04 Nov 2021 20:44:40 +0800	[thread overview]
Message-ID: <202111042001.BBwFIQmU-lkp@intel.com> (raw)
In-Reply-To: <20211102113139.154140-1-maksym.wezdecki@collabora.com>

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

Hi Maksym,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm/drm-next]
[also build test ERROR on next-20211104]
[cannot apply to v5.15]
[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]

url:    https://github.com/0day-ci/linux/commits/Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
base:   git://anongit.freedesktop.org/drm/drm drm-next
config: i386-buildonly-randconfig-r002-20211101 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 264d3b6d4e08401c5b50a85bd76e80b3461d77e6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/1795d2fd78a334a37a02dba76ac1e314cf122467
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Maksym-Wezdecki/drm-virtio-delay-pinning-the-pages-till-first-use/20211102-193430
        git checkout 1795d2fd78a334a37a02dba76ac1e314cf122467
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/virtio/virtgpu_object.c:254:11: error: variable 'ents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                       ^~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:219:35: note: initialize the variable 'ents' to silence this warning
           struct virtio_gpu_mem_entry *ents;
                                            ^
                                             = NULL
>> drivers/gpu/drm/virtio/virtgpu_object.c:254:17: error: variable 'nents' is uninitialized when used here [-Werror,-Wuninitialized]
                                                       ents, nents);
                                                             ^~~~~
   drivers/gpu/drm/virtio/virtgpu_object.c:220:20: note: initialize the variable 'nents' to silence this warning
           unsigned int nents;
                             ^
                              = 0
   2 errors generated.


vim +/ents +254 drivers/gpu/drm/virtio/virtgpu_object.c

2f2aa13724d568 Gerd Hoffmann   2020-02-07  210  
dc5698e80cf724 Dave Airlie     2013-09-09  211  int virtio_gpu_object_create(struct virtio_gpu_device *vgdev,
4441235f9566e6 Gerd Hoffmann   2019-03-18  212  			     struct virtio_gpu_object_params *params,
530b28426a94b8 Gerd Hoffmann   2019-03-18  213  			     struct virtio_gpu_object **bo_ptr,
530b28426a94b8 Gerd Hoffmann   2019-03-18  214  			     struct virtio_gpu_fence *fence)
dc5698e80cf724 Dave Airlie     2013-09-09  215  {
e2324300f427ff Gerd Hoffmann   2019-08-29  216  	struct virtio_gpu_object_array *objs = NULL;
c66df701e783bc Gerd Hoffmann   2019-08-29  217  	struct drm_gem_shmem_object *shmem_obj;
dc5698e80cf724 Dave Airlie     2013-09-09  218  	struct virtio_gpu_object *bo;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  219  	struct virtio_gpu_mem_entry *ents;
2f2aa13724d568 Gerd Hoffmann   2020-02-07  220  	unsigned int nents;
dc5698e80cf724 Dave Airlie     2013-09-09  221  	int ret;
dc5698e80cf724 Dave Airlie     2013-09-09  222  
dc5698e80cf724 Dave Airlie     2013-09-09  223  	*bo_ptr = NULL;
dc5698e80cf724 Dave Airlie     2013-09-09  224  
c66df701e783bc Gerd Hoffmann   2019-08-29  225  	params->size = roundup(params->size, PAGE_SIZE);
c66df701e783bc Gerd Hoffmann   2019-08-29  226  	shmem_obj = drm_gem_shmem_create(vgdev->ddev, params->size);
c66df701e783bc Gerd Hoffmann   2019-08-29  227  	if (IS_ERR(shmem_obj))
c66df701e783bc Gerd Hoffmann   2019-08-29  228  		return PTR_ERR(shmem_obj);
c66df701e783bc Gerd Hoffmann   2019-08-29  229  	bo = gem_to_virtio_gpu_obj(&shmem_obj->base);
dc5698e80cf724 Dave Airlie     2013-09-09  230  
556c62e85f9b97 Matthew Wilcox  2018-10-30  231  	ret = virtio_gpu_resource_id_get(vgdev, &bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  232  	if (ret < 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  233  		goto err_free_gem;
e2324300f427ff Gerd Hoffmann   2019-08-29  234  
530b28426a94b8 Gerd Hoffmann   2019-03-18  235  	bo->dumb = params->dumb;
530b28426a94b8 Gerd Hoffmann   2019-03-18  236  
e2324300f427ff Gerd Hoffmann   2019-08-29  237  	if (fence) {
e2324300f427ff Gerd Hoffmann   2019-08-29  238  		ret = -ENOMEM;
e2324300f427ff Gerd Hoffmann   2019-08-29  239  		objs = virtio_gpu_array_alloc(1);
e2324300f427ff Gerd Hoffmann   2019-08-29  240  		if (!objs)
e2324300f427ff Gerd Hoffmann   2019-08-29  241  			goto err_put_id;
c66df701e783bc Gerd Hoffmann   2019-08-29  242  		virtio_gpu_array_add_obj(objs, &bo->base.base);
e2324300f427ff Gerd Hoffmann   2019-08-29  243  
e2324300f427ff Gerd Hoffmann   2019-08-29  244  		ret = virtio_gpu_array_lock_resv(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  245  		if (ret != 0)
e2324300f427ff Gerd Hoffmann   2019-08-29  246  			goto err_put_objs;
e2324300f427ff Gerd Hoffmann   2019-08-29  247  	}
e2324300f427ff Gerd Hoffmann   2019-08-29  248  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  249  	if (params->blob) {
3389082bb98296 Vivek Kasireddy 2021-04-12  250  		if (params->blob_mem == VIRTGPU_BLOB_MEM_GUEST)
3389082bb98296 Vivek Kasireddy 2021-04-12  251  			bo->guest_blob = true;
3389082bb98296 Vivek Kasireddy 2021-04-12  252  
897b4d1acaf563 Gerd Hoffmann   2020-09-23  253  		virtio_gpu_cmd_resource_create_blob(vgdev, bo, params,
897b4d1acaf563 Gerd Hoffmann   2020-09-23 @254  						    ents, nents);
897b4d1acaf563 Gerd Hoffmann   2020-09-23  255  	} else if (params->virgl) {
30172efbfb842c Gurchetan Singh 2020-09-23  256  		virtio_gpu_cmd_resource_create_3d(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  257  						  objs, fence);
30172efbfb842c Gurchetan Singh 2020-09-23  258  	} else {
1795d2fd78a334 mwezdeck        2021-11-02  259  		ret = virtio_gpu_object_shmem_init(vgdev, bo, &ents, &nents);
1795d2fd78a334 mwezdeck        2021-11-02  260  		if (ret != 0) {
1795d2fd78a334 mwezdeck        2021-11-02  261  			virtio_gpu_array_put_free(objs);
1795d2fd78a334 mwezdeck        2021-11-02  262  			virtio_gpu_free_object(&shmem_obj->base);
1795d2fd78a334 mwezdeck        2021-11-02  263  			return ret;
1795d2fd78a334 mwezdeck        2021-11-02  264  		}
30172efbfb842c Gurchetan Singh 2020-09-23  265  		virtio_gpu_cmd_create_resource(vgdev, bo, params,
30172efbfb842c Gurchetan Singh 2020-09-23  266  					       objs, fence);
c76d4ab764adae Gurchetan Singh 2020-04-01  267  		virtio_gpu_object_attach(vgdev, bo, ents, nents);
30172efbfb842c Gurchetan Singh 2020-09-23  268  	}
dc5698e80cf724 Dave Airlie     2013-09-09  269  
dc5698e80cf724 Dave Airlie     2013-09-09  270  	*bo_ptr = bo;
dc5698e80cf724 Dave Airlie     2013-09-09  271  	return 0;
e2324300f427ff Gerd Hoffmann   2019-08-29  272  
e2324300f427ff Gerd Hoffmann   2019-08-29  273  err_put_objs:
e2324300f427ff Gerd Hoffmann   2019-08-29  274  	virtio_gpu_array_put_free(objs);
e2324300f427ff Gerd Hoffmann   2019-08-29  275  err_put_id:
e2324300f427ff Gerd Hoffmann   2019-08-29  276  	virtio_gpu_resource_id_put(vgdev, bo->hw_res_handle);
e2324300f427ff Gerd Hoffmann   2019-08-29  277  err_free_gem:
c66df701e783bc Gerd Hoffmann   2019-08-29  278  	drm_gem_shmem_free_object(&shmem_obj->base);
e2324300f427ff Gerd Hoffmann   2019-08-29  279  	return ret;
dc5698e80cf724 Dave Airlie     2013-09-09  280  }
1795d2fd78a334 mwezdeck        2021-11-02  281  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

  parent reply	other threads:[~2021-11-04 12:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 11:31 [PATCH] drm/virtio: delay pinning the pages till first use Maksym Wezdecki
2021-11-02 11:31 ` Maksym Wezdecki
2021-11-02 13:03 ` Gerd Hoffmann
2021-11-02 13:03   ` Gerd Hoffmann
2021-11-02 15:58   ` Chia-I Wu
2021-11-02 15:58     ` Chia-I Wu
2021-11-03  7:30     ` Gerd Hoffmann
2021-11-03  7:30       ` Gerd Hoffmann
2021-11-04 12:44 ` kernel test robot [this message]
2021-11-04 12:44   ` kernel test robot
2021-11-04 12:44   ` kernel test robot
2021-11-04 12:44   ` kernel test robot

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=202111042001.BBwFIQmU-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=kraxel@redhat.com \
    --cc=llvm@lists.linux.dev \
    --cc=maksym.wezdecki@collabora.co.uk \
    --cc=maksym.wezdecki@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 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.