[PATCH 00/03] fbdev: maxine: clean up build issues

STALE63d

8 messages, 3 authors, 2026-08-17 · open the first message on its own page

[PATCH 00/03] fbdev: maxine: clean up build issues

From: Randy Dunlap <rdunlap@infradead.org>
Date: 2026-08-13 23:29:50

This is all ancient source code from the beginning of git time.
Now builds cleanly on 32-bit and 64-bit MACH_DECSTATION.


Subject: [PATCH 01/03] fbdev: maxine: make functions static
Subject: [PATCH 02/03] fbdev: maxine: elide an unused function
Subject: [PATCH 03/03] fbdev: maxine: fix 64-bit build error

 drivers/video/fbdev/maxinefb.c |    9 ++++++---
 include/video/maxinefb.h       |    4 ++--
 2 files changed, 8 insertions(+), 5 deletions(-)

Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>

[PATCH 01/03] fbdev: maxine: make functions static

From: Randy Dunlap <rdunlap@infradead.org>
Date: 2026-08-13 23:29:53

Make 3 functions static so that they don't need to be declared in a
header file.

../drivers/video/fbdev/maxinefb.c:64:6: warning: no previous prototype for 'maxinefb_ims332_write_register' [-Wmissing-prototypes]
   64 | void maxinefb_ims332_write_register(int regno, register unsigned int val)
../drivers/video/fbdev/maxinefb.c:74:14: warning: no previous prototype for 'maxinefb_ims332_read_register' [-Wmissing-prototypes]
   74 | unsigned int maxinefb_ims332_read_register(int regno)
../drivers/video/fbdev/maxinefb.c:114:12: warning: no previous prototype for 'maxinefb_init' [-Wmissing-prototypes]
  114 | int __init maxinefb_init(void)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>

 drivers/video/fbdev/maxinefb.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
--- linux-next-20260812.orig/drivers/video/fbdev/maxinefb.c
+++ linux-next-20260812/drivers/video/fbdev/maxinefb.c
@@ -61,7 +61,7 @@ static struct fb_fix_screeninfo maxinefb
 
 /* Handle the funny Inmos RamDAC/video controller ... */
 
-void maxinefb_ims332_write_register(int regno, register unsigned int val)
+static void maxinefb_ims332_write_register(int regno, register unsigned int val)
 {
 	register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;
 	unsigned char *wptr;
@@ -71,7 +71,7 @@ void maxinefb_ims332_write_register(int
 	*((volatile unsigned short *) (wptr)) = val;
 }
 
-unsigned int maxinefb_ims332_read_register(int regno)
+static unsigned int maxinefb_ims332_read_register(int regno)
 {
 	register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;
 	unsigned char *rptr;
@@ -111,7 +111,7 @@ static const struct fb_ops maxinefb_ops
 	.fb_setcolreg	= maxinefb_setcolreg,
 };
 
-int __init maxinefb_init(void)
+static int __init maxinefb_init(void)
 {
 	unsigned long fboff;
 	unsigned long fb_start;

[PATCH 02/03] fbdev: maxine: elide an unused function

From: Randy Dunlap <rdunlap@infradead.org>
Date: 2026-08-13 23:29:55

maxinefb_ims332_read_register() is not used, but since it describes a
hardware interface, leave it in the source file as documentation
and surround it inside an #if 0/#endif block.

../drivers/video/fbdev/maxinefb.c:74:21: warning: 'maxinefb_ims332_read_register' defined but not used [-Wunused-function]
   74 | static unsigned int maxinefb_ims332_read_register(int regno)

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>

 drivers/video/fbdev/maxinefb.c |    3 +++
 1 file changed, 3 insertions(+)
--- linux-next-20260812.orig/drivers/video/fbdev/maxinefb.c
+++ linux-next-20260812/drivers/video/fbdev/maxinefb.c
@@ -71,6 +71,8 @@ static void maxinefb_ims332_write_regist
 	*((volatile unsigned short *) (wptr)) = val;
 }
 
+#if 0
+/* dead code: leave here for hardware interface documentation */
 static unsigned int maxinefb_ims332_read_register(int regno)
 {
 	register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;
@@ -83,6 +85,7 @@ static unsigned int maxinefb_ims332_read
 
 	return (j & 0xffff) | ((k & 0xff00) << 8);
 }
+#endif
 
 /* Set the palette */
 static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,

[PATCH 03/03] fbdev: maxine: fix 64-bit build error

From: Randy Dunlap <rdunlap@infradead.org>
Date: 2026-08-13 23:29:57

The KSEG1ADDR() macro is only defined for non-64BIT builds.
Use the CKSEG1ADDR() macro instead.

In file included from ../drivers/video/fbdev/maxinefb.c:34:
../drivers/video/fbdev/maxinefb.c: In function 'maxinefb_ims332_write_register':
../include/video/maxinefb.h:16:41: error: implicit declaration of function 'KSEG1ADDR'; did you mean 'CKSEG1ADDR'? [-Wimplicit-function-declaration]
   16 | #define MAXINEFB_IMS332_ADDRESS         KSEG1ADDR(0x1c140000)
../drivers/video/fbdev/maxinefb.c:66:49: note: in expansion of macro 'MAXINEFB_IMS332_ADDRESS'
   66 |         register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;
../drivers/video/fbdev/maxinefb.c:66:40: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   66 |         register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
---
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>

 include/video/maxinefb.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-next-20260812.orig/include/video/maxinefb.h
+++ linux-next-20260812/include/video/maxinefb.h
@@ -13,13 +13,13 @@
 /*
  * IMS332 video controller register base address
  */
-#define MAXINEFB_IMS332_ADDRESS		KSEG1ADDR(0x1c140000)
+#define MAXINEFB_IMS332_ADDRESS		CKSEG1ADDR(0x1c140000)
 
 /*
  * Begin of DECstation 5000/xx onboard framebuffer memory, default resolution
  * is 1024x768x8
  */
-#define DS5000_xx_ONBOARD_FBMEM_START	KSEG1ADDR(0x0a000000)
+#define DS5000_xx_ONBOARD_FBMEM_START	CKSEG1ADDR(0x0a000000)
 
 /*
  *      The IMS 332 video controller used in the DECstation 5000/xx series

Re: [PATCH 00/03] fbdev: maxine: clean up build issues

From: Helge Deller <deller@gmx.de>
Date: 2026-08-14 07:39:23

On 8/14/26 01:29, Randy Dunlap wrote:
This is all ancient source code from the beginning of git time.
Now builds cleanly on 32-bit and 64-bit MACH_DECSTATION.


Subject: [PATCH 01/03] fbdev: maxine: make functions static
Subject: [PATCH 02/03] fbdev: maxine: elide an unused function
Subject: [PATCH 03/03] fbdev: maxine: fix 64-bit build error

  drivers/video/fbdev/maxinefb.c |    9 ++++++---
  include/video/maxinefb.h       |    4 ++--
  2 files changed, 8 insertions(+), 5 deletions(-)
Thanks Randy!

I've applied all patches (including #4).
I'll add upcoming Reviewed-by/Acked-by tags too.

Helge
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>

Re: [PATCH 01/03] fbdev: maxine: make functions static

From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2026-08-17 16:57:03

On Thu, 13 Aug 2026, Randy Dunlap wrote:
Make 3 functions static so that they don't need to be declared in a
header file.
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>

  Maciej

Re: [PATCH 02/03] fbdev: maxine: elide an unused function

From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2026-08-17 16:57:19

On Thu, 13 Aug 2026, Randy Dunlap wrote:
maxinefb_ims332_read_register() is not used, but since it describes a
hardware interface, leave it in the source file as documentation
and surround it inside an #if 0/#endif block.
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>

  Maciej

Re: [PATCH 03/03] fbdev: maxine: fix 64-bit build error

From: "Maciej W. Rozycki" <macro@orcam.me.uk>
Date: 2026-08-17 16:57:41

On Thu, 13 Aug 2026, Randy Dunlap wrote:
The KSEG1ADDR() macro is only defined for non-64BIT builds.
Use the CKSEG1ADDR() macro instead.
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>

  Maciej
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help