Skip to contentSkip to conversation

video: au1100fb: Remove casting the return value which is a void pointer

PATCH Applied Jingoo Han 2 participants 2 messages Sep 9, 2013 – Sep 16, 2013 Framebuffer layer

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 video: au1100fb: Remove casting the return value which is a void pointer

Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language.

---
 drivers/video/au1100fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/au1100fb.c +1 -1
index a54ccdc..248abd5 100644
@@ -588,7 +588,7 @@ int au1100fb_drv_remove(struct platform_device *dev)
 	if (!dev)
 		return -ENODEV;
 
-	fbdev = (struct au1100fb_device *) platform_get_drvdata(dev);
+	fbdev = platform_get_drvdata(dev);
 
 #if !defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_LOGO)
 	au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info);
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 15 lines · Jingoo Han

Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language.

---
 drivers/video/au1100fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/au1100fb.c +0 -0
index a54ccdc..248abd5 100644

drivers/video/au1100fb.c int au1100fb_drv_remove(struct platform_device *dev) · line 594

Quoted 8 lines
drivers/video/au1100fb.c +1 -1
@@ -588,7 +588,7 @@ int au1100fb_drv_remove(struct platform_device *dev)
 	if (!dev)
 		return -ENODEV;
 
-	fbdev = (struct au1100fb_device *) platform_get_drvdata(dev);
+	fbdev = platform_get_drvdata(dev);
 
 #if !defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_LOGO)
 	au1100fb_fb_blank(VESA_POWERDOWN, &fbdev->info);

Thanks, applied for 3.13.

Tomi