fbdev/hitfb: Various fixes
Subsystems (2)
cover fbdev/hitfb: Various fixes
Fix a number of minor warnings in the hitfb driver. I discovered them while working on bb47f218fd01 ("fbdev/hitfb: Cast I/O offset to address").
Thomas Zimmermann (3):
fbdev/hitfb: Declare hitfb_blank() as static
fbdev/hitfb: Fix integer-to-pointer cast
fbdev/hitfb: Use NULL for pointers
drivers/video/fbdev/hitfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
base-commit: 29c0f369e17ba0abf08c65ca065417aebab208c6
Signature · 1 line
2.40.1
PATCH 1/3 fbdev/hitfb: Declare hitfb_blank() as static
Fixes the following warnings:
../drivers/video/fbdev/hitfb.c:186:5: warning: no previous prototype for 'hitfb_blank' [-Wmissing-prototypes]
186 | int hitfb_blank(int blank_mode, struct fb_info *info)
| ^~~~~~~~~~~
../drivers/video/fbdev/hitfb.c:186:5: warning: symbol 'hitfb_blank' was not declared. Should it be static?
--- drivers/video/fbdev/hitfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/hitfb.c +1 -1
@@ -183,7 +183,7 @@ static int hitfb_pan_display(struct fb_var_screeninfo *var,return 0 ; } -int hitfb_blank (int blank_mode,struct fb_info *info) +static int hitfb_blank (int blank_mode,struct fb_info *info) {unsigned short v;
Signature · 1 line
2.40.1
PATCH 2/3 fbdev/hitfb: Fix integer-to-pointer cast
In reply to Thomas ZimmermannFix the type casting from unsigned long to char __iomem *. Resolves the following warning:
../drivers/video/fbdev/hitfb.c:411:27: warning: incorrect type in assignment (different address spaces)../drivers/video/fbdev/hitfb.c:411:27: expected char [noderef] __iomem *screen_base../drivers/video/fbdev/hitfb.c:411:27: got void *
--- drivers/video/fbdev/hitfb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/hitfb.c +1 -1
@@ -408,7 +408,7 @@ static int hitfb_probe(struct platform_device *dev) info->flags =FBINFO_DEFAULT |FBINFO_HWACCEL_YPAN |FBINFO_HWACCEL_FILLRECT |FBINFO_HWACCEL_COPYAREA ; - info->screen_base = (void *)hitfb_fix.smem_start; + info->screen_base = (char __iomem *)(uintptr_t )hitfb_fix.smem_start; ret =fb_alloc_cmap (&info->cmap,256 ,0 );if (unlikely (ret <0 ))
Signature · 1 line
2.40.1
PATCH 3/3 fbdev/hitfb: Use NULL for pointers
In reply to Thomas ZimmermannReplace integer constants with NULL. Resolves the following warnings:
../drivers/video/fbdev/hitfb.c:447:23: warning: Using plain integer as NULL pointer ../drivers/video/fbdev/hitfb.c:465:23: warning: Using plain integer as NULL pointer
--- drivers/video/fbdev/hitfb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/fbdev/hitfb.c +2 -2
@@ -444,7 +444,7 @@ static int hitfb_suspend(struct device *dev) {u16 v; -hitfb_blank (1 ,0 ); +hitfb_blank (1 ,NULL ); v =hitfb_readw (HD64461_STBCR ); v |=HD64461_STBCR_SLCKE_IST ;hitfb_writew (v,HD64461_STBCR );
@@ -462,7 +462,7 @@ static int hitfb_resume(struct device *dev) v =hitfb_readw (HD64461_STBCR ); v &= ~HD64461_STBCR_SLCKE_IST ;hitfb_writew (v,HD64461_STBCR ); -hitfb_blank (0 ,0 ); +hitfb_blank (0 ,NULL );return 0 ; }
Signature · 1 line
2.40.1
Quoted 10 lines
-----Original Message-----
From: dri-devel <[email protected]> On Behalf Of Thomas Zimmermann
Sent: Tuesday, June 6, 2023 6:41 AM
To: [email protected]; [email protected]
Cc: [email protected]; Thomas Zimmermann <[email protected]>; [email protected]; linux- [email protected]
Subject: [PATCH 0/3] fbdev/hitfb: Various fixes
Quoted 8 lines
Fix a number of minor warnings in the hitfb driver. I discovered them while working on
bb47f218fd01("fbdev/hitfb: Cast I/O offset to address").Thomas Zimmermann (3):
fbdev/hitfb: Declarehitfb_blank()as static
fbdev/hitfb: Fix integer-to-pointer cast
fbdev/hitfb: Use NULL for pointers
These look reasonable to me.
For the series:
Quoted 7 lines
drivers/video/fbdev/hitfb.c| 8 ++++----1 file changed, 4 insertions(+), 4 deletions(-)base-commit:
29c0f369e17ba0abf08c65ca065417aebab208c6--
2.40.1
Helge, do you take these patches?
Am 06.06.23 um 12:40 schrieb Thomas Zimmermann:
Quoted 14 lines
Fix a number of minor warnings in the hitfb driver. I discovered them while working on
bb47f218fd01("fbdev/hitfb: Cast I/O offset to address").Thomas Zimmermann (3):
fbdev/hitfb: Declarehitfb_blank()as static
fbdev/hitfb: Fix integer-to-pointer cast
fbdev/hitfb: Use NULL for pointersdrivers/video/fbdev/hitfb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)base-commit:
29c0f369e17ba0abf08c65ca065417aebab208c6
Signature · 6 lines
Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg)