Hi Thomas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on next-20200813]
[cannot apply to drm-intel/for-linux-next linux-arm/drm-armada-devel
linux-arm/drm-armada-fixes anholt/for-next v5.8]
[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/Thomas-Zimmermann/Convert-all-re...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
dc06fe51d26efc100ac74121607c01a454867c91
config: i386-randconfig-m021-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/gpu/drm/drm_prime.c:389 export_and_register_object() error: uninitialized symbol
'dmabuf'.
Old smatch warnings:
drivers/gpu/drm/drm_prime.c:359 drm_gem_prime_fd_to_handle() warn: inconsistent returns
'dev->object_name_lock'.
vim +/dmabuf +389 drivers/gpu/drm/drm_prime.c
89177644a7b6306 Aaron Plattner 2013-01-15 374
319c933c71f3dbd Daniel Vetter 2013-08-15 375 static struct dma_buf
*export_and_register_object(struct drm_device *dev,
319c933c71f3dbd Daniel Vetter 2013-08-15 376 struct drm_gem_object *obj,
319c933c71f3dbd Daniel Vetter 2013-08-15 377 uint32_t flags)
319c933c71f3dbd Daniel Vetter 2013-08-15 378 {
319c933c71f3dbd Daniel Vetter 2013-08-15 379 struct dma_buf *dmabuf;
319c933c71f3dbd Daniel Vetter 2013-08-15 380
319c933c71f3dbd Daniel Vetter 2013-08-15 381 /* prevent races with concurrent
gem_close. */
319c933c71f3dbd Daniel Vetter 2013-08-15 382 if (obj->handle_count == 0) {
319c933c71f3dbd Daniel Vetter 2013-08-15 383 dmabuf = ERR_PTR(-ENOENT);
319c933c71f3dbd Daniel Vetter 2013-08-15 384 return dmabuf;
319c933c71f3dbd Daniel Vetter 2013-08-15 385 }
319c933c71f3dbd Daniel Vetter 2013-08-15 386
b39b5394fabc79a Noralf Trønnes 2018-11-10 387 if (obj->funcs &&
obj->funcs->export)
b39b5394fabc79a Noralf Trønnes 2018-11-10 388 dmabuf = obj->funcs->export(obj,
flags);
319c933c71f3dbd Daniel Vetter 2013-08-15 @389 if (IS_ERR(dmabuf)) {
319c933c71f3dbd Daniel Vetter 2013-08-15 390 /* normally the created dma-buf takes
ownership of the ref,
319c933c71f3dbd Daniel Vetter 2013-08-15 391 * but if that fails then drop the ref
319c933c71f3dbd Daniel Vetter 2013-08-15 392 */
319c933c71f3dbd Daniel Vetter 2013-08-15 393 return dmabuf;
319c933c71f3dbd Daniel Vetter 2013-08-15 394 }
319c933c71f3dbd Daniel Vetter 2013-08-15 395
319c933c71f3dbd Daniel Vetter 2013-08-15 396 /*
319c933c71f3dbd Daniel Vetter 2013-08-15 397 * Note that callers do not need to clean
up the export cache
319c933c71f3dbd Daniel Vetter 2013-08-15 398 * since the check for
obj->handle_count guarantees that someone
319c933c71f3dbd Daniel Vetter 2013-08-15 399 * will clean it up.
319c933c71f3dbd Daniel Vetter 2013-08-15 400 */
319c933c71f3dbd Daniel Vetter 2013-08-15 401 obj->dma_buf = dmabuf;
319c933c71f3dbd Daniel Vetter 2013-08-15 402 get_dma_buf(obj->dma_buf);
319c933c71f3dbd Daniel Vetter 2013-08-15 403
319c933c71f3dbd Daniel Vetter 2013-08-15 404 return dmabuf;
319c933c71f3dbd Daniel Vetter 2013-08-15 405 }
319c933c71f3dbd Daniel Vetter 2013-08-15 406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org