sparc64: Fix prototype warnings and out of sync function signature
Andreas Larsson
maintainercover sparc64: Fix prototype warnings and out of sync function signature
This patch series fixes a number of prototype warnings as well as fixes a function signature that has become out of sync with its caller.
Andreas Larsson (4):
sparc64: Fix prototype warnings for floppy_64.h
sparc64: Fix incorrect function signature and add prototype for
prom_cif_init
sparc64: Fix prototype warning for prom_get_mmu_ihandle
sparc64: Fix prototype warnings in hibernate.c
arch/sparc/include/asm/floppy_64.h | 5 +++-- arch/sparc/include/asm/oplib_64.h | 1 + arch/sparc/power/hibernate.c | 1 + arch/sparc/prom/init_64.c | 3 --- arch/sparc/prom/misc_64.c | 2 +- arch/sparc/prom/p1275.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-)
Signature · 1 line
2.34.1
Andreas Larsson
maintainerPATCH 1/4 sparc64: Fix prototype warnings for floppy_64.h
Fix the following warnings:
arch/sparc/include/asm/floppy_64.h:200:13: warning: no previous prototype for ‘sparc_floppy_irq’ arch/sparc/include/asm/floppy_64.h:437:6: warning: no previous prototype for ‘sun_pci_fd_dma_callback’
Both sparc_floppy_irq and sun_pci_fd_dma_callback are only used within arch/sparc/include/asm/floppy_64.h that is included only by drivers/block/floppy.c, so declare them static.
--- arch/sparc/include/asm/floppy_64.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/sparc/include/asm/floppy_64.h +3 -2
@@ -197,7 +197,7 @@ static void sun_fd_enable_dma(void) pdma_areasize = pdma_size; } -irqreturn_t sparc_floppy_irq (int irq,void *dev_cookie) +static irqreturn_t sparc_floppy_irq (int irq,void *dev_cookie) {if (likely (doing_pdma)) {void __iomem *stat = (void __iomem *) fdc_status;
@@ -434,7 +434,8 @@ static int sun_pci_fd_eject(int drive)return -EINVAL ; } -void sun_pci_fd_dma_callback (struct ebus_dma_info *p,int event,void *cookie) +static void sun_pci_fd_dma_callback (struct ebus_dma_info *p,int event, +void *cookie) {floppy_interrupt (0 ,NULL ); }
Signature · 1 line
2.34.1
Andreas Larsson
maintainerPATCH 2/4 sparc64: Fix incorrect function signature and add prototype for prom_cif_init
In reply to Andreas LarssonRemove 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’
--- arch/sparc/include/asm/oplib_64.h | 1 + arch/sparc/prom/init_64.c | 3 --- arch/sparc/prom/p1275.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-)
arch/sparc/include/asm/oplib_64.h +1 -0
@@ -247,6 +247,7 @@ void prom_sun4v_guest_soft_state(void);int prom_ihandle2path (int handle,char *buffer,int bufsize);/* Client interface level routines. */ +void prom_cif_init (void *cif_handler);void p1275_cmd_direct (unsigned long *);#endif /* !(__SPARC64_OPLIB_H) */
arch/sparc/prom/init_64.c +0 -3
@@ -26,9 +26,6 @@ phandle prom_chosen_node;* routines in the prom library. * It gets passed the pointer to the PROM vector. */ - -extern void prom_cif_init (void *); -void __init prom_init (void *cif_handler) {phandle node;
arch/sparc/prom/p1275.c +1 -1
@@ -49,7 +49,7 @@ void p1275_cmd_direct(unsigned long *args)local_irq_restore (flags); } -void prom_cif_init (void *cif_handler,void *cif_stack) +void prom_cif_init (void *cif_handler) { p1275buf.prom_cif_handler = (void (*)(long *))cif_handler; }
Signature · 1 line
2.34.1
Andreas Larsson
maintainerPATCH 3/4 sparc64: Fix prototype warning for prom_get_mmu_ihandle
In reply to Andreas Larssonarch/sparc/prom/misc_64.c:165:5: warning: no previous prototype for ‘prom_get_mmu_ihandle’
The function prom_get_mmu_ihandle has no users outside of misc_64.c so declare it static.
--- arch/sparc/prom/misc_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sparc/prom/misc_64.c +1 -1
@@ -162,7 +162,7 @@ unsigned char prom_get_idprom(char *idbuf, int num_bytes)return 0xff ; } -int prom_get_mmu_ihandle (void ) +static int prom_get_mmu_ihandle (void ) {phandle node;int ret;
Signature · 1 line
2.34.1
Andreas Larsson
maintainerPATCH 4/4 sparc64: Fix prototype warnings in hibernate.c
In reply to Andreas LarssonFix the following warnings:arch/sparc/power/hibernate.c:22:5: warning: no previous prototype for ‘pfn_is_nosave’ arch/sparc/power/hibernate.c:30:6: warning: no previous prototype for ‘save_processor_state’ arch/sparc/power/hibernate.c:35:6: warning: no previous prototype for ‘restore_processor_state’
The prototypes are available from linux/suspend.h so include that.
--- arch/sparc/power/hibernate.c | 1 + 1 file changed, 1 insertion(+)
arch/sparc/power/hibernate.c +1 -0
@@ -5,6 +5,7 @@* Copyright (C) 2013 Kirill V Tkhai ([email protected]) */ +#include <linux/suspend.h> #include <linux/mm.h> #include <asm/hibernate.h>
Signature · 1 line
2.34.1