Skip to contentSkip to conversation

drm/imx: hide an unused label

PATCH Applied Arnd Bergmann 2 participants 2 messages Sep 22, 2016 – Sep 27, 2016

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

PATCH 1/1 drm/imx: hide an unused label

The imx_drm_bind function causes a warning in linux-next when CONFIG_DRM_FBDEV_EMULATION is not set:

drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind':
drivers/gpu/drm/imx/imx-drm-core.c:441:1: error: label 'err_unbind' defined but not used [-Werror=unused-label]

I don't understand why the warning only showed up now, as the code has not been modified recently, but there is an obvious fix in adding another #if for the symbol.

Fixes c1ff5a7aa3c3 ("drm/imx: Remove local fbdev emulation Kconfig option")
---
 drivers/gpu/drm/imx/imx-drm-core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/imx/imx-drm-core.c +2 -0
index 98df09c2b388..b084c571b23f 100644
@@ -436,9 +436,11 @@ static int imx_drm_bind(struct device *dev)
 
 err_fbhelper:
 	drm_kms_helper_poll_fini(drm);
+#if IS_ENABLED(CONFIG_DRM_FBDEV_EMULATION)
 	if (imxdrm->fbhelper)
 		drm_fbdev_cma_fini(imxdrm->fbhelper);
 err_unbind:
+#endif
 	component_unbind_all(drm->dev, drm);
 err_vblank:
 	drm_vblank_cleanup(drm);
Signature · 1 line
2.9.0
#1 lore raw

Am Donnerstag, den 22.09.2016, 11:50 +0200 schrieb Arnd Bergmann:

Quoted 6 lines

The imx_drm_bind function causes a warning in linux-next when CONFIG_DRM_FBDEV_EMULATION is not set:

drivers/gpu/drm/imx/imx-drm-core.c: In function 'imx_drm_bind':
drivers/gpu/drm/imx/imx-drm-core.c:441:1: error: label 'err_unbind' defined but not used [-Werror=unused-label]

Quoted 6 lines

I don't understand why the warning only showed up now, as the code has not been modified recently, but there is an obvious fix in adding another #if for the symbol.

Fixes c1ff5a7aa3c3 ("drm/imx: Remove local fbdev emulation Kconfig option")

Applied, thank you.

regards
Philipp

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