Skip to contentSkip to conversation

MIPS: ralink: Fix missing prototypes warnings

PATCH Applied Vincent Legoll 2 participants 5 messages Aug 12, 2024 – Aug 29, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover MIPS: ralink: Fix missing prototypes warnings

While building a current kernel for GnuBee PC1 hardware, I got some warnings about missing function prototypes.

The following patches fix the warnings.
Is that the proper way to fix them ?

BTW, this is only compile-tested.

#1 lore raw

PATCH 1/2 MIPS: ralink: Fix missing `plat_time_init` prototype

Fix the following warning:

CC arch/mips/ralink/timer-gic.o
arch/mips/ralink/timer-gic.c:18:13: warning: no previous prototype for 'plat_time_init' [-Wmissing-prototypes]
18 | void __init plat_time_init(void)

      |             ^~~~~~~~~~~~~~
---
 arch/mips/ralink/timer-gic.c | 2 ++
 1 file changed, 2 insertions(+)
arch/mips/ralink/timer-gic.c +2 -0
index dcf2a44ac51e..926082655a78 100644
@@ -11,6 +11,8 @@
 #include <linux/of_clk.h>
 #include <linux/clocksource.h>
 
+#include <asm/time.h>
+
 #include "common.h"
 
 void __init plat_time_init(void)
Signature · 1 line
2.46.0
maintainer Applied
#2 lore raw

Re: [PATCH 1/2] MIPS: ralink: Fix missing `plat_time_init` prototype

Quoted 27 lines · Vincent Legoll

Fix the following warning:

CC arch/mips/ralink/timer-gic.o
arch/mips/ralink/timer-gic.c:18:13: warning: no previous prototype for 'plat_time_init' [-Wmissing-prototypes]
18 | void __init plat_time_init(void)

      |             ^~~~~~~~~~~~~~
---
 arch/mips/ralink/timer-gic.c | 2 ++
 1 file changed, 2 insertions(+)
arch/mips/ralink/timer-gic.c +2 -0
index dcf2a44ac51e..926082655a78 100644
@@ -11,6 +11,8 @@
 #include <linux/of_clk.h>
 #include <linux/clocksource.h>
 
+#include <asm/time.h>
+
 #include "common.h"
 
 void __init plat_time_init(void)
Signature · 1 line
2.46.0

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]
#3 lore raw

PATCH 2/2 MIPS: ralink: Fix missing `get_c0_perfcount_int` prototype

In reply to Vincent Legoll

Fix the following warning:

CC arch/mips/ralink/irq-gic.o
arch/mips/ralink/irq-gic.c:15:5: warning: no previous prototype for 'get_c0_perfcount_int' [-Wmissing-prototypes]
15 | int get_c0_perfcount_int(void)

      |     ^~~~~~~~~~~~~~~~~~~~
---
 arch/mips/ralink/irq-gic.c | 1 +
 1 file changed, 1 insertion(+)
arch/mips/ralink/irq-gic.c +1 -0
index 3bab51a5fb4c..8bc566ea00e5 100644
@@ -10,6 +10,7 @@
 #include <linux/of.h>
 #include <linux/irqchip.h>
 #include <asm/mips-cps.h>
+#include <asm/time.h>
 
 int get_c0_perfcount_int(void)
 {
Signature · 1 line
2.46.0
maintainer Applied
#4 lore raw

Re: [PATCH 2/2] MIPS: ralink: Fix missing `get_c0_perfcount_int` prototype

Quoted 26 lines · Vincent Legoll

Fix the following warning:

CC arch/mips/ralink/irq-gic.o
arch/mips/ralink/irq-gic.c:15:5: warning: no previous prototype for 'get_c0_perfcount_int' [-Wmissing-prototypes]
15 | int get_c0_perfcount_int(void)

      |     ^~~~~~~~~~~~~~~~~~~~
---
 arch/mips/ralink/irq-gic.c | 1 +
 1 file changed, 1 insertion(+)
arch/mips/ralink/irq-gic.c +1 -0
index 3bab51a5fb4c..8bc566ea00e5 100644
@@ -10,6 +10,7 @@
 #include <linux/of.h>
 #include <linux/irqchip.h>
 #include <asm/mips-cps.h>
+#include <asm/time.h>
 
 int get_c0_perfcount_int(void)
 {
Signature · 1 line
2.46.0

applied to mips-next.

Thomas.

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