Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mips: zboot: Fix "no previous prototype" build warning

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>

authored by

Serge Semin and committed by
Thomas Bogendoerfer
6d778f61 a640d676

+6
+2
arch/mips/boot/compressed/uart-16550.c
··· 8 8 9 9 #include <asm/addrspace.h> 10 10 11 + #include "decompress.h" 12 + 11 13 #if defined(CONFIG_MACH_LOONGSON64) || defined(CONFIG_MIPS_MALTA) 12 14 #define UART_BASE 0x1fd003f8 13 15 #define PORT(offset) (CKSEG1ADDR(UART_BASE) + (offset))
+2
arch/mips/boot/compressed/uart-alchemy.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <asm/mach-au1x00/au1000.h> 3 3 4 + #include "decompress.h" 5 + 4 6 void putc(char c) 5 7 { 6 8 alchemy_uart_putchar(AU1000_UART0_PHYS_ADDR, c);
+2
arch/mips/boot/compressed/uart-prom.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 #include <asm/setup.h> 3 3 4 + #include "decompress.h" 5 + 4 6 void putc(char c) 5 7 { 6 8 prom_putchar(c);