Dan Carpenter
2022-Apr-11 06:39 UTC
[Nouveau] [bug report] drm/nouveau: stop using dma_resv_excl_fence
Hello Christian K?nig, The patch 756cc94d15fa: "drm/nouveau: stop using dma_resv_excl_fence" from Nov 3, 2021, leads to the following Smatch static checker warning: drivers/gpu/drm/nouveau/nouveau_bo.c:971 nouveau_bo_vm_cleanup() error: uninitialized symbol 'fence'. drivers/gpu/drm/nouveau/nouveau_bo.c 955 static void 956 nouveau_bo_vm_cleanup(struct ttm_buffer_object *bo, 957 struct nouveau_drm_tile *new_tile, 958 struct nouveau_drm_tile **old_tile) 959 { 960 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); 961 struct drm_device *dev = drm->dev; 962 struct dma_fence *fence; 963 int ret; 964 965 /* TODO: This is actually a memory management dependency */ 966 ret = dma_resv_get_singleton(bo->base.resv, false, &fence); 967 if (ret) 968 dma_resv_wait_timeout(bo->base.resv, false, false, 969 MAX_SCHEDULE_TIMEOUT); "fence" is uninitialized of dma_resv_get_singleton() fails. 970 --> 971 nv10_bo_put_tile_region(dev, *old_tile, fence); 972 *old_tile = new_tile; 973 } regards, dan carpenter