[PATCH v2 21/28] video: fbdev: tmiofb: Fix set but not used warnings

From
Sam Ravnborg <hidden>
Date
2020-11-28 22:42:41
Also in
dri-devel
Reply to
Sam Ravnborg, 2020-11-28
Fix W=1 warnings by avoiding local variables and use direct references.

v2:
  - Updated subject (Lee)

Signed-off-by: Sam Ravnborg <redacted>
Cc: Daniel Vetter <redacted>
Cc: Sam Ravnborg <redacted>
Cc: Jani Nikula <redacted>
Cc: Lee Jones <redacted>
---
 drivers/video/fbdev/tmiofb.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/video/fbdev/tmiofb.c b/drivers/video/fbdev/tmiofb.c
index 50111966c981..b70faa3850f2 100644
--- a/drivers/video/fbdev/tmiofb.c
+++ b/drivers/video/fbdev/tmiofb.c
@@ -802,10 +802,8 @@ static int tmiofb_remove(struct platform_device *dev)
 	const struct mfd_cell *cell = mfd_get_cell(dev);
 	struct fb_info *info = platform_get_drvdata(dev);
 	int irq = platform_get_irq(dev, 0);
-	struct tmiofb_par *par;
 
 	if (info) {
-		par = info->par;
 		unregister_framebuffer(info);
 
 		tmiofb_hw_stop(dev);
@@ -816,8 +814,8 @@ static int tmiofb_remove(struct platform_device *dev)
 		free_irq(irq, info);
 
 		iounmap(info->screen_base);
-		iounmap(par->lcr);
-		iounmap(par->ccr);
+		iounmap(((struct tmiofb_par *)info->par)->lcr);
+		iounmap(((struct tmiofb_par *)info->par)->ccr);
 
 		framebuffer_release(info);
 	}
-- 
2.27.0
Thread (78 messages) 78 messages, 7 authors, last reply 2020-12-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help