[Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning
Pankaj Bharadiya
pankaj.laxminarayan.bharadiya at intel.com
Mon Mar 2 12:56:46 UTC 2020
nouveau_drm pointer is not getting used anymore in
nv50_mstm_{register,destroy}_connector functions, hence remove it.
This fixes below warning.
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_destroy_connector’:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable ‘drm’ [-Wunused-variable]
struct nouveau_drm *drm = nouveau_drm(connector->dev);
^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_register_connector’:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable ‘drm’ [-Wunused-variable]
struct nouveau_drm *drm = nouveau_drm(connector->dev);
^~~
Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya at intel.com>
---
drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 97dd50e2917d..4e164ad8003f 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1260,7 +1260,6 @@ static void
nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
struct drm_connector *connector)
{
- struct nouveau_drm *drm = nouveau_drm(connector->dev);
struct nv50_mstc *mstc = nv50_mstc(connector);
drm_connector_unregister(&mstc->connector);
@@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
static void
nv50_mstm_register_connector(struct drm_connector *connector)
{
- struct nouveau_drm *drm = nouveau_drm(connector->dev);
-
drm_connector_register(connector);
}
--
2.20.1
More information about the Intel-gfx
mailing list