[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20191218185109.23671-1-pakki001@umn.edu>
Date: Wed, 18 Dec 2019 12:51:09 -0600
From: Aditya Pakki <pakki001@....edu>
To: pakki001@....edu
Cc: kjlu@....edu,
VMware Graphics <linux-graphics-maintainer@...are.com>,
Thomas Hellstrom <thellstrom@...are.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH] drm/vmwgfx: remove unnecessary assertion in vmw_resource_alloc_id
Every caller of vmw_resource_alloc_id checks if id is not -1. The
assertion in the said function is thus redundant and can be removed.
The patch removes the check.
Signed-off-by: Aditya Pakki <pakki001@....edu>
---
drivers/gpu/drm/vmwgfx/vmwgfx_resource.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
index c8441030637a..50c8eb8012fd 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_resource.c
@@ -183,8 +183,6 @@ int vmw_resource_alloc_id(struct vmw_resource *res)
int ret;
struct idr *idr = &dev_priv->res_idr[res->func->res_type];
- BUG_ON(res->id != -1);
-
idr_preload(GFP_KERNEL);
spin_lock(&dev_priv->resource_lock);
--
2.20.1
Powered by blists - more mailing lists