Hi "Christian, I love your patch! Perhaps something to improve: [auto build test WARNING on drm-tip/drm-tip] [also build test WARNING on next-20200923] [cannot apply to drm-exynos/exynos-drm-next drm-intel/for-linux-next tegra-drm/drm/tegra/for-next linus/master drm/drm-next v5.9-rc6] [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/Christian-K-nig/drm-ttm-add-ttm_bo_pin-ttm_bo_unpin/20200921-234857 base: git://anongit.freedesktop.org/drm/drm-tip drm-tip config: i386-randconfig-s031-20200923 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.2-201-g24bdaac6-dirty # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/vmwgfx/vmwgfx_bo.c:518:36: sparse: sparse: Using plain integer as NULL pointer # https://github.com/0day-ci/linux/commit/4f52191faabdaf44db9409b13ccea5ec0da52704 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Christian-K-nig/drm-ttm-add-ttm_bo_pin-ttm_bo_unpin/20200921-234857 git checkout 4f52191faabdaf44db9409b13ccea5ec0da52704 vim +518 drivers/gpu/drm/vmwgfx/vmwgfx_bo.c 489 490 /** 491 * vmw_bo_create_kernel - Create a pinned BO for internal kernel use. 492 * 493 * @dev_priv: Pointer to the device private struct 494 * @size: size of the BO we need 495 * @placement: where to put it 496 * @p_bo: resulting BO 497 * 498 * Creates and pin a simple BO for in kernel use. 499 */ 500 int vmw_bo_create_kernel(struct vmw_private *dev_priv, unsigned long size, 501 struct ttm_placement *placement, 502 struct ttm_buffer_object **p_bo) 503 { 504 unsigned npages = PAGE_ALIGN(size) >> PAGE_SHIFT; 505 struct ttm_buffer_object *bo; 506 size_t acc_size; 507 int ret; 508 509 bo = kzalloc(sizeof(*bo), GFP_KERNEL); 510 if (unlikely(!bo)) 511 return -ENOMEM; 512 513 acc_size = ttm_round_pot(sizeof(*bo)); 514 acc_size += ttm_round_pot(npages * sizeof(void *)); 515 acc_size += ttm_round_pot(sizeof(struct ttm_tt)); 516 ret = ttm_bo_init_reserved(&dev_priv->bdev, bo, size, 517 ttm_bo_type_device, placement, 0, > 518 false, acc_size, NULL, NULL, NULL); 519 if (unlikely(ret)) 520 goto error_free; 521 522 ttm_bo_pin(bo); 523 ttm_bo_unreserve(bo); 524 *p_bo = bo; 525 526 return 0; 527 528 error_free: 529 kfree(bo); 530 return ret; 531 } 532 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org