Skip to contentSkip to conversation

drm/sti: remove unused variable

PATCH In review Arnd Bergmann 2 participants 3 messages Feb 21, 2017 – Feb 22, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/sti: remove unused variable

One variable was left behind after its user got removed and we should now delete the declaration as well:

drivers/gpu/drm/sti/sti_vtg.c: In function 'vtg_probe':
drivers/gpu/drm/sti/sti_vtg.c:392:22: error: unused variable 'np' [-Werror=unused-variable]

Fixes 0c7ff84f7f9d ("drm/sti: remove deprecated legacy vtg slave")
---
 drivers/gpu/drm/sti/sti_vtg.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/sti/sti_vtg.c +0 -1
index 943bce56692e..2dcba1d3a122 100644
@@ -389,7 +389,6 @@ static irqreturn_t vtg_irq(int irq, void *arg)
 static int vtg_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np;
 	struct sti_vtg *vtg;
 	struct resource *res;
 	int ret;
Signature · 6 lines
2.9.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/2 drm/sti: remove unused sti_drm_dbg_cleanup

A cleanup patch just introduced this function, but no user, leading to a compile-time warning:

drivers/gpu/drm/sti/sti_drv.c:120:13: error: 'sti_drm_dbg_cleanup' defined but not used [-Werror=unused-function]

It would be logical that we should actually call this function, but I couldn't see from where, so this patch just shuts up the warning, which may be the wrong approach.

Fixes 5e60f595d6ca ("drm/sti: use atomic_helper for commit")
---
 drivers/gpu/drm/sti/sti_drv.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/sti/sti_drv.c +0 -9
index e6c1646b9c53..20fc0fbfa849 100644
@@ -117,15 +117,6 @@ static int sti_drm_dbg_init(struct drm_minor *minor)
 	return ret;
 }
 
-static void sti_drm_dbg_cleanup(struct drm_minor *minor)
-{
-	drm_debugfs_remove_files(sti_drm_dbg_list,
-				 ARRAY_SIZE(sti_drm_dbg_list), minor);
-
-	drm_debugfs_remove_files((struct drm_info_list *)&sti_drm_fps_fops,
-				 1, minor);
-}
-
 static int sti_atomic_check(struct drm_device *dev,
 			    struct drm_atomic_state *state)
 {
Signature · 6 lines
2.9.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
In reply to Arnd Bergmann

2017-02-21 23:03 GMT+01:00 Arnd Bergmann <[email protected]>:

Quoted 8 lines

One variable was left behind after its user got removed and we should now delete the declaration as well:

drivers/gpu/drm/sti/sti_vtg.c: In function 'vtg_probe':
drivers/gpu/drm/sti/sti_vtg.c:392:22: error: unused variable 'np' [-Werror=unused-variable]

Fixes 0c7ff84f7f9d ("drm/sti: remove deprecated legacy vtg slave")

Hi Arnd,

Thanks for the patch but Vincent has send a patch for the both issues issues a day ago :-)
https://lists.freedesktop.org/archives/dri-devel/2017-February/133346.html

Benjamin

Quoted 19 lines
---
 drivers/gpu/drm/sti/sti_vtg.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/sti/sti_vtg.c +0 -2
index 943bce56692e..2dcba1d3a122 100644
@@ -389,7 +389,6 @@ static irqreturn_t vtg_irq(int irq, void *arg)
 static int vtg_probe(struct platform_device *pdev)
 {
        struct device *dev = &pdev->dev;
-       struct device_node *np;
        struct sti_vtg *vtg;
        struct resource *res;
        int ret;
--

2.9.0

Signature · 11 lines
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel