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

xtensa: boot/lib: fix function prototypes

Add function prototype for gunzip() to the boot library code and make
exit() and zalloc() static.

arch/xtensa/boot/lib/zmem.c:8:6: warning: no previous prototype for 'exit' [-Wmissing-prototypes]
8 | void exit (void)
arch/xtensa/boot/lib/zmem.c:13:7: warning: no previous prototype for 'zalloc' [-Wmissing-prototypes]
13 | void *zalloc(unsigned size)
arch/xtensa/boot/lib/zmem.c:35:6: warning: no previous prototype for 'gunzip' [-Wmissing-prototypes]
35 | void gunzip (void *dst, int dstlen, unsigned char *src, int *lenp)

Fixes: 4bedea945451 ("xtensa: Architecture support for Tensilica Xtensa Part 2")
Fixes: e7d163f76665 ("xtensa: Removed local copy of zlib and fixed O= support")
Suggested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>

+3 -2
+3 -2
arch/xtensa/boot/lib/zmem.c
··· 4 4 /* bits taken from ppc */ 5 5 6 6 extern void *avail_ram, *end_avail; 7 + void gunzip(void *dst, int dstlen, unsigned char *src, int *lenp); 7 8 8 - void exit (void) 9 + static void exit(void) 9 10 { 10 11 for (;;); 11 12 } 12 13 13 - void *zalloc(unsigned size) 14 + static void *zalloc(unsigned int size) 14 15 { 15 16 void *p = avail_ram; 16 17