* [PATCH 1/4] sparc64: Fix prototype warnings for floppy_64.h
2024-07-10 9:41 [PATCH 0/4] sparc64: Fix prototype warnings and out of sync function signature Andreas Larsson
@ 2024-07-10 9:41 ` Andreas Larsson
2024-07-10 9:41 ` [PATCH 2/4] sparc64: Fix incorrect function signature and add prototype for prom_cif_init Andreas Larsson
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Larsson @ 2024-07-10 9:41 UTC (permalink / raw)
To: David Miller, sparclinux; +Cc: Sam Ravnborg, linux-kernel
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.
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
arch/sparc/include/asm/floppy_64.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/sparc/include/asm/floppy_64.h b/arch/sparc/include/asm/floppy_64.h
index 83decacd0a2d5..b0f633ce35188 100644
--- a/arch/sparc/include/asm/floppy_64.h
+++ b/arch/sparc/include/asm/floppy_64.h
@@ -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);
}
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 2/4] sparc64: Fix incorrect function signature and add prototype for prom_cif_init
2024-07-10 9:41 [PATCH 0/4] sparc64: Fix prototype warnings and out of sync function signature Andreas Larsson
2024-07-10 9:41 ` [PATCH 1/4] sparc64: Fix prototype warnings for floppy_64.h Andreas Larsson
@ 2024-07-10 9:41 ` Andreas Larsson
2024-07-10 9:41 ` [PATCH 3/4] sparc64: Fix prototype warning for prom_get_mmu_ihandle Andreas Larsson
2024-07-10 9:41 ` [PATCH 4/4] sparc64: Fix prototype warnings in hibernate.c Andreas Larsson
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Larsson @ 2024-07-10 9:41 UTC (permalink / raw)
To: David Miller, sparclinux; +Cc: Sam Ravnborg, linux-kernel
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.")
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
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(-)
diff --git a/arch/sparc/include/asm/oplib_64.h b/arch/sparc/include/asm/oplib_64.h
index a67abebd43592..1b86d02a84556 100644
--- a/arch/sparc/include/asm/oplib_64.h
+++ b/arch/sparc/include/asm/oplib_64.h
@@ -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) */
diff --git a/arch/sparc/prom/init_64.c b/arch/sparc/prom/init_64.c
index 103aa91043185..f7b8a1a865b8f 100644
--- a/arch/sparc/prom/init_64.c
+++ b/arch/sparc/prom/init_64.c
@@ -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;
diff --git a/arch/sparc/prom/p1275.c b/arch/sparc/prom/p1275.c
index 889aa602f8d86..51c3f984bbf72 100644
--- a/arch/sparc/prom/p1275.c
+++ b/arch/sparc/prom/p1275.c
@@ -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;
}
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 3/4] sparc64: Fix prototype warning for prom_get_mmu_ihandle
2024-07-10 9:41 [PATCH 0/4] sparc64: Fix prototype warnings and out of sync function signature Andreas Larsson
2024-07-10 9:41 ` [PATCH 1/4] sparc64: Fix prototype warnings for floppy_64.h Andreas Larsson
2024-07-10 9:41 ` [PATCH 2/4] sparc64: Fix incorrect function signature and add prototype for prom_cif_init Andreas Larsson
@ 2024-07-10 9:41 ` Andreas Larsson
2024-07-10 9:41 ` [PATCH 4/4] sparc64: Fix prototype warnings in hibernate.c Andreas Larsson
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Larsson @ 2024-07-10 9:41 UTC (permalink / raw)
To: David Miller, sparclinux; +Cc: Sam Ravnborg, linux-kernel
arch/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.
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
arch/sparc/prom/misc_64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sparc/prom/misc_64.c b/arch/sparc/prom/misc_64.c
index aed94cd4a1e73..3792736ff21fd 100644
--- a/arch/sparc/prom/misc_64.c
+++ b/arch/sparc/prom/misc_64.c
@@ -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;
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 4/4] sparc64: Fix prototype warnings in hibernate.c
2024-07-10 9:41 [PATCH 0/4] sparc64: Fix prototype warnings and out of sync function signature Andreas Larsson
` (2 preceding siblings ...)
2024-07-10 9:41 ` [PATCH 3/4] sparc64: Fix prototype warning for prom_get_mmu_ihandle Andreas Larsson
@ 2024-07-10 9:41 ` Andreas Larsson
3 siblings, 0 replies; 5+ messages in thread
From: Andreas Larsson @ 2024-07-10 9:41 UTC (permalink / raw)
To: David Miller, sparclinux; +Cc: Sam Ravnborg, linux-kernel
Fix 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.
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
arch/sparc/power/hibernate.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/sparc/power/hibernate.c b/arch/sparc/power/hibernate.c
index 47b06f4af1f91..da8e2bc2e516a 100644
--- a/arch/sparc/power/hibernate.c
+++ b/arch/sparc/power/hibernate.c
@@ -5,6 +5,7 @@
* Copyright (C) 2013 Kirill V Tkhai (tkhai@yandex.ru)
*/
+#include <linux/suspend.h>
#include <linux/mm.h>
#include <asm/hibernate.h>
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread