fbdev: maxine: elide an unused function
authorRandy Dunlap <rdunlap@infradead.org>
Thu, 13 Aug 2026 23:29:33 +0000 (16:29 -0700)
committerHelge Deller <deller@gmx.de>
Thu, 20 Aug 2026 21:45:06 +0000 (23:45 +0200)
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>
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/maxinefb.c

index a9410a5..10249a1 100644 (file)
@@ -71,6 +71,8 @@ static void maxinefb_ims332_write_register(int regno, register unsigned int val)
        *((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_register(int regno)
 
        return (j & 0xffff) | ((k & 0xff00) << 8);
 }
+#endif
 
 /* Set the palette */
 static int maxinefb_setcolreg(unsigned regno, unsigned red, unsigned green,