mips: zboot: Fix "no previous prototype" build warning
authorSerge Semin <fancer.lancer@gmail.com>
Thu, 15 Feb 2024 17:17:28 +0000 (20:17 +0300)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Fri, 23 Feb 2024 09:14:06 +0000 (10:14 +0100)
Without having the putc() prototype forwardly declared the next
build-warning is printed:

arch/mips/boot/compressed/uart-prom.c:6:6: warning: no previous prototype for ‘putc’ [-Wmissing-prototypes]
...

Fix that by adding the "decompress.h" header file with the putc() function
declaration to the source files which have the method redefined.

Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/boot/compressed/uart-16550.c
arch/mips/boot/compressed/uart-alchemy.c
arch/mips/boot/compressed/uart-prom.c

index 09dcd2c..db618e7 100644 (file)
@@ -8,6 +8,8 @@
 
 #include <asm/addrspace.h>
 
+#include "decompress.h"
+
 #if defined(CONFIG_MACH_LOONGSON64) || defined(CONFIG_MIPS_MALTA)
 #define UART_BASE 0x1fd003f8
 #define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset))
index 8ec6301..003967c 100644 (file)
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <asm/mach-au1x00/au1000.h>
 
+#include "decompress.h"
+
 void putc(char c)
 {
        alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c);
index a8a0a32..5fa3b99 100644 (file)
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <asm/setup.h>
 
+#include "decompress.h"
+
 void putc(char c)
 {
        prom_putchar(c);