* [PATCH 0/3] fbdev/hitfb: Various fixes
@ 2023-06-06 10:40 Thomas Zimmermann
  2023-06-06 10:40 ` [PATCH 1/3] fbdev/hitfb: Declare hitfb_blank() as static Thomas Zimmermann
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2023-06-06 10:40 UTC (permalink / raw)
  To: deller, David.Laight; +Cc: linux-fbdev, dri-devel, linux-sh, Thomas Zimmermann
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
-- 
2.40.1
^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH 1/3] fbdev/hitfb: Declare hitfb_blank() as static
  2023-06-06 10:40 [PATCH 0/3] fbdev/hitfb: Various fixes Thomas Zimmermann
@ 2023-06-06 10:40 ` Thomas Zimmermann
  2023-06-06 10:40 ` [PATCH 2/3] fbdev/hitfb: Fix integer-to-pointer cast Thomas Zimmermann
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2023-06-06 10:40 UTC (permalink / raw)
  To: deller, David.Laight; +Cc: linux-fbdev, dri-devel, linux-sh, Thomas Zimmermann
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?
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/video/fbdev/hitfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/hitfb.c b/drivers/video/fbdev/hitfb.c
index fb82869283db..551b00f761a7 100644
--- a/drivers/video/fbdev/hitfb.c
+++ b/drivers/video/fbdev/hitfb.c
@@ -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;
 
-- 
2.40.1
^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 2/3] fbdev/hitfb: Fix integer-to-pointer cast
  2023-06-06 10:40 [PATCH 0/3] fbdev/hitfb: Various fixes Thomas Zimmermann
  2023-06-06 10:40 ` [PATCH 1/3] fbdev/hitfb: Declare hitfb_blank() as static Thomas Zimmermann
@ 2023-06-06 10:40 ` Thomas Zimmermann
  2023-06-06 10:40 ` [PATCH 3/3] fbdev/hitfb: Use NULL for pointers Thomas Zimmermann
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2023-06-06 10:40 UTC (permalink / raw)
  To: deller, David.Laight; +Cc: linux-fbdev, dri-devel, linux-sh, Thomas Zimmermann
Fix 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 *
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/video/fbdev/hitfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/hitfb.c b/drivers/video/fbdev/hitfb.c
index 551b00f761a7..1ee3aa3d3fc7 100644
--- a/drivers/video/fbdev/hitfb.c
+++ b/drivers/video/fbdev/hitfb.c
@@ -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))
-- 
2.40.1
^ permalink raw reply related	[flat|nested] 6+ messages in thread
* [PATCH 3/3] fbdev/hitfb: Use NULL for pointers
  2023-06-06 10:40 [PATCH 0/3] fbdev/hitfb: Various fixes Thomas Zimmermann
  2023-06-06 10:40 ` [PATCH 1/3] fbdev/hitfb: Declare hitfb_blank() as static Thomas Zimmermann
  2023-06-06 10:40 ` [PATCH 2/3] fbdev/hitfb: Fix integer-to-pointer cast Thomas Zimmermann
@ 2023-06-06 10:40 ` Thomas Zimmermann
  2023-06-06 12:35 ` [PATCH 0/3] fbdev/hitfb: Various fixes Ruhl, Michael J
  2023-06-12 14:59 ` Thomas Zimmermann
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2023-06-06 10:40 UTC (permalink / raw)
  To: deller, David.Laight; +Cc: linux-fbdev, dri-devel, linux-sh, Thomas Zimmermann
Replace 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
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/video/fbdev/hitfb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/hitfb.c b/drivers/video/fbdev/hitfb.c
index 1ee3aa3d3fc7..c6b3d9f38c01 100644
--- a/drivers/video/fbdev/hitfb.c
+++ b/drivers/video/fbdev/hitfb.c
@@ -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;
 }
-- 
2.40.1
^ permalink raw reply related	[flat|nested] 6+ messages in thread
* RE: [PATCH 0/3] fbdev/hitfb: Various fixes
  2023-06-06 10:40 [PATCH 0/3] fbdev/hitfb: Various fixes Thomas Zimmermann
                   ` (2 preceding siblings ...)
  2023-06-06 10:40 ` [PATCH 3/3] fbdev/hitfb: Use NULL for pointers Thomas Zimmermann
@ 2023-06-06 12:35 ` Ruhl, Michael J
  2023-06-12 14:59 ` Thomas Zimmermann
  4 siblings, 0 replies; 6+ messages in thread
From: Ruhl, Michael J @ 2023-06-06 12:35 UTC (permalink / raw)
  To: Thomas Zimmermann, deller@gmx.de, David.Laight@ACULAB.COM
  Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-sh@vger.kernel.org
>-----Original Message-----
>From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>Thomas Zimmermann
>Sent: Tuesday, June 6, 2023 6:41 AM
>To: deller@gmx.de; David.Laight@ACULAB.COM
>Cc: linux-fbdev@vger.kernel.org; Thomas Zimmermann
><tzimmermann@suse.de>; dri-devel@lists.freedesktop.org; linux-
>sh@vger.kernel.org
>Subject: [PATCH 0/3] 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
These look reasonable to me.
For the series:
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
> drivers/video/fbdev/hitfb.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
>
>base-commit: 29c0f369e17ba0abf08c65ca065417aebab208c6
>--
>2.40.1
^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] fbdev/hitfb: Various fixes
  2023-06-06 10:40 [PATCH 0/3] fbdev/hitfb: Various fixes Thomas Zimmermann
                   ` (3 preceding siblings ...)
  2023-06-06 12:35 ` [PATCH 0/3] fbdev/hitfb: Various fixes Ruhl, Michael J
@ 2023-06-12 14:59 ` Thomas Zimmermann
  4 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2023-06-12 14:59 UTC (permalink / raw)
  To: deller, David.Laight; +Cc: linux-fbdev, dri-devel, linux-sh
[-- Attachment #1.1: Type: text/plain, Size: 803 bytes --]
Helge, do you take these patches?
Am 06.06.23 um 12:40 schrieb Thomas Zimmermann:
> 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
-- 
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)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
^ permalink raw reply	[flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-06-12 14:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 10:40 [PATCH 0/3] fbdev/hitfb: Various fixes Thomas Zimmermann
2023-06-06 10:40 ` [PATCH 1/3] fbdev/hitfb: Declare hitfb_blank() as static Thomas Zimmermann
2023-06-06 10:40 ` [PATCH 2/3] fbdev/hitfb: Fix integer-to-pointer cast Thomas Zimmermann
2023-06-06 10:40 ` [PATCH 3/3] fbdev/hitfb: Use NULL for pointers Thomas Zimmermann
2023-06-06 12:35 ` [PATCH 0/3] fbdev/hitfb: Various fixes Ruhl, Michael J
2023-06-12 14:59 ` Thomas Zimmermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).