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

sparc64: Fix incorrect function signature and add prototype for prom_cif_init

Remove the unused cif_stack argument and add a protype in oplib_64.h
Commit ef3e035c3a9b ("sparc64: Fix register corruption in top-most
kernel stack frame during boot.") removed the cif_stack argument to
prom_cif init in the declaration at the caller site and the usage of it
within prom_cif_init, but not in the function signature of the function
itself.

This also fixes the following warning:
arch/sparc/prom/p1275.c:52:6: warning: no previous prototype for ‘prom_cif_init’

Fixes: ef3e035c3a9b ("sparc64: Fix register corruption in top-most kernel stack frame during boot.")
Link: https://lore.kernel.org/r/20240710094155.458731-3-andreas@gaisler.com
Signed-off-by: Andreas Larsson <andreas@gaisler.com>

+2 -4
+1
arch/sparc/include/asm/oplib_64.h
··· 247 247 int prom_ihandle2path(int handle, char *buffer, int bufsize); 248 248 249 249 /* Client interface level routines. */ 250 + void prom_cif_init(void *cif_handler); 250 251 void p1275_cmd_direct(unsigned long *); 251 252 252 253 #endif /* !(__SPARC64_OPLIB_H) */
-3
arch/sparc/prom/init_64.c
··· 26 26 * routines in the prom library. 27 27 * It gets passed the pointer to the PROM vector. 28 28 */ 29 - 30 - extern void prom_cif_init(void *); 31 - 32 29 void __init prom_init(void *cif_handler) 33 30 { 34 31 phandle node;
+1 -1
arch/sparc/prom/p1275.c
··· 49 49 local_irq_restore(flags); 50 50 } 51 51 52 - void prom_cif_init(void *cif_handler, void *cif_stack) 52 + void prom_cif_init(void *cif_handler) 53 53 { 54 54 p1275buf.prom_cif_handler = (void (*)(long *))cif_handler; 55 55 }