2024-05-16 12:18:26

by Genjian

[permalink] [raw]
Subject: [PATCH 3/3] MIPS: ip22-gio: Make ip22_gio_set_64bit() and ip22_gio_init() static

From: Genjian Zhang <[email protected]>

These functions are used in only one file.
Made them static to fix the following build error:

arch/mips/sgi-ip22/ip22-gio.c:249:6: error: no previous prototype for ‘ip22_gio_set_64bit’ [-Werror=missing-prototypes]
arch/mips/sgi-ip22/ip22-gio.c:398:12: error: no previous prototype for ‘ip22_gio_init’ [-Werror=missing-prototypes]

Reported-by: k2ci <[email protected]>
Signed-off-by: Genjian Zhang <[email protected]>
---
arch/mips/sgi-ip22/ip22-gio.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/sgi-ip22/ip22-gio.c b/arch/mips/sgi-ip22/ip22-gio.c
index a3cdcb289941..2738325e98dd 100644
--- a/arch/mips/sgi-ip22/ip22-gio.c
+++ b/arch/mips/sgi-ip22/ip22-gio.c
@@ -246,7 +246,7 @@ void gio_set_master(struct gio_device *dev)
}
EXPORT_SYMBOL_GPL(gio_set_master);

-void ip22_gio_set_64bit(int slotno)
+static void ip22_gio_set_64bit(int slotno)
{
u32 tmp = sgimc->giopar;

@@ -395,7 +395,7 @@ static struct resource gio_bus_resource = {
.flags = IORESOURCE_MEM,
};

-int __init ip22_gio_init(void)
+static int __init ip22_gio_init(void)
{
unsigned int pbdma __maybe_unused;
int ret;
--
2.25.1



2024-06-11 12:23:08

by Thomas Bogendoerfer

[permalink] [raw]
Subject: Re: [PATCH 3/3] MIPS: ip22-gio: Make ip22_gio_set_64bit() and ip22_gio_init() static

On Thu, May 16, 2024 at 07:59:06PM +0800, Genjian wrote:
> From: Genjian Zhang <[email protected]>
>
> These functions are used in only one file.
> Made them static to fix the following build error:
>
> arch/mips/sgi-ip22/ip22-gio.c:249:6: error: no previous prototype for ‘ip22_gio_set_64bit’ [-Werror=missing-prototypes]
> arch/mips/sgi-ip22/ip22-gio.c:398:12: error: no previous prototype for ‘ip22_gio_init’ [-Werror=missing-prototypes]
>
> Reported-by: k2ci <[email protected]>
> Signed-off-by: Genjian Zhang <[email protected]>
> ---
> arch/mips/sgi-ip22/ip22-gio.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]