diff mbox

[U-Boot,v2,13/14] powerpc, 8xx: fix missing function declarations.

Message ID 39a41cd18ab6804409f48adc185b705505c846c9.1499945943.git.christophe.leroy@c-s.fr
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Christophe Leroy July 13, 2017, 1:10 p.m. UTC
Add missing .h and add missing declarations in .h
Declare local functions as static

Based on warnings reported by 'make C=2'

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
---
 arch/powerpc/cpu/mpc8xx/immap.c | 13 +++++++------
 arch/powerpc/cpu/mpc8xx/traps.c |  2 +-
 arch/powerpc/include/asm/ppc.h  |  5 +++++
 arch/powerpc/lib/bootm.c        |  2 ++
 arch/powerpc/lib/interrupts.c   |  3 ---
 drivers/net/mpc8xx_fec.c        |  1 +
 6 files changed, 16 insertions(+), 10 deletions(-)

Comments

Tom Rini July 25, 2017, 12:44 a.m. UTC | #1
On Thu, Jul 13, 2017 at 03:10:08PM +0200, Christophe Leroy wrote:

> Add missing .h and add missing declarations in .h
> Declare local functions as static
> 
> Based on warnings reported by 'make C=2'
> 
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Note that when applying I dropped a few of these fixes as we have
differing prototypes on other PowerPC platforms.  I've addressed those
and will post in a separate short series.

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc8xx/immap.c b/arch/powerpc/cpu/mpc8xx/immap.c
index 6da085325d..2284979dd6 100644
--- a/arch/powerpc/cpu/mpc8xx/immap.c
+++ b/arch/powerpc/cpu/mpc8xx/immap.c
@@ -19,7 +19,7 @@ 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	sysconf8xx_t __iomem *sc = &immap->im_siu_conf;
@@ -36,7 +36,8 @@  int do_siuinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc,
+		       char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	memctl8xx_t __iomem *memctl = &immap->im_memctl;
@@ -58,7 +59,7 @@  int do_memcinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 	return 0;
 }
 
-int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_carinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	car8xx_t __iomem *car = &immap->im_clkrst;
@@ -119,7 +120,7 @@  static void binary(char *label, uint value, int nbits)
 #define PC_NBITS	12
 #define PD_NBITS	13
 
-int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	iop8xx_t __iomem *iop = &immap->im_ioport;
@@ -172,7 +173,7 @@  int do_iopinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
  * this needs a clean up for smaller tighter code
  * use *uint and set the address based on cmd + port
  */
-int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_iopset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	uint rcode = 0;
 	iopin_t iopin;
@@ -328,7 +329,7 @@  static void prbrg(int n, uint val)
 	putc('\n');
 }
 
-int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_brginfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
 	immap_t __iomem *immap = (immap_t __iomem *)CONFIG_SYS_IMMR;
 	cpm8xx_t __iomem *cp = &immap->im_cpm;
diff --git a/arch/powerpc/cpu/mpc8xx/traps.c b/arch/powerpc/cpu/mpc8xx/traps.c
index ebf4e412c9..23646adadd 100644
--- a/arch/powerpc/cpu/mpc8xx/traps.c
+++ b/arch/powerpc/cpu/mpc8xx/traps.c
@@ -52,7 +52,7 @@  static void print_backtrace(unsigned long *sp)
 	printf("\n");
 }
 
-void show_regs(struct pt_regs *regs)
+static void show_regs(struct pt_regs *regs)
 {
 	int i;
 
diff --git a/arch/powerpc/include/asm/ppc.h b/arch/powerpc/include/asm/ppc.h
index aa5dd85b44..dc12b981e6 100644
--- a/arch/powerpc/include/asm/ppc.h
+++ b/arch/powerpc/include/asm/ppc.h
@@ -122,6 +122,11 @@  static inline void set_msr(unsigned long msr)
 void print_reginfo(void);
 #endif
 
+void cpu_init_f(immap_t __iomem *immr);
+int interrupt_init_cpu(unsigned *);
+void timer_interrupt_cpu(struct pt_regs *);
+unsigned long search_exception_table(unsigned long addr);
+
 #endif /* !__ASSEMBLY__ */
 
 #ifdef CONFIG_PPC
diff --git a/arch/powerpc/lib/bootm.c b/arch/powerpc/lib/bootm.c
index 42a6afbc31..0e204027af 100644
--- a/arch/powerpc/lib/bootm.c
+++ b/arch/powerpc/lib/bootm.c
@@ -18,6 +18,8 @@ 
 #include <environment.h>
 #include <asm/byteorder.h>
 #include <asm/mp.h>
+#include <bootm.h>
+#include <vxworks.h>
 
 #if defined(CONFIG_OF_LIBFDT)
 #include <libfdt.h>
diff --git a/arch/powerpc/lib/interrupts.c b/arch/powerpc/lib/interrupts.c
index ccba829710..46fa18c63f 100644
--- a/arch/powerpc/lib/interrupts.c
+++ b/arch/powerpc/lib/interrupts.c
@@ -28,9 +28,6 @@  void __board_show_activity (ulong dummy)
 #define CONFIG_SYS_WATCHDOG_FREQ (CONFIG_SYS_HZ / 2)
 #endif
 
-extern int interrupt_init_cpu (unsigned *);
-extern void timer_interrupt_cpu (struct pt_regs *);
-
 static unsigned decrementer_count; /* count value for 1e6/HZ microseconds */
 
 static __inline__ unsigned long get_dec (void)
diff --git a/drivers/net/mpc8xx_fec.c b/drivers/net/mpc8xx_fec.c
index e525d3b593..71fe984a5d 100644
--- a/drivers/net/mpc8xx_fec.c
+++ b/drivers/net/mpc8xx_fec.c
@@ -10,6 +10,7 @@ 
 #include <commproc.h>
 #include <malloc.h>
 #include <net.h>
+#include <netdev.h>
 #include <asm/io.h>
 
 #include <phy.h>