This commit removes the call to drm_gem_create_mmap_offset() from the BO_MMAP_OFFSET ioctl handler. The call was redundant and didn't have any effect as file offset range is allocated unconditionally at the BO creation time.
v2: - New patch Suggested-by: Boris Brezillon <[email protected]> Signed-off-by: Akash Goel <[email protected]> --- drivers/gpu/drm/panthor/panthor_drv.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/panthor/panthor_drv.c b/drivers/gpu/drm/panthor/panthor_drv.c index 1ca8aedd83f4..dc8d0191aef4 100644 --- a/drivers/gpu/drm/panthor/panthor_drv.c +++ b/drivers/gpu/drm/panthor/panthor_drv.c @@ -1081,7 +1081,7 @@ static int panthor_ioctl_bo_mmap_offset(struct drm_device *ddev, void *data, struct drm_panthor_bo_mmap_offset *args = data; struct panthor_gem_object *bo; struct drm_gem_object *obj; - int ret; + int ret = 0; if (args->pad) return -EINVAL; @@ -1096,10 +1096,6 @@ static int panthor_ioctl_bo_mmap_offset(struct drm_device *ddev, void *data, goto out; } - ret = drm_gem_create_mmap_offset(obj); - if (ret) - goto out; - args->offset = drm_vma_node_offset_addr(&obj->vma_node); out: -- 2.25.1
