[rtems commit] bsp/mpc8xx: Fix warnings

Sebastian Huber sebh at rtems.org
Fri Dec 12 14:33:00 UTC 2014


Module:    rtems
Branch:    master
Commit:    3507f3f953cb9be14eea8bf3d03b6e29bba51b98
Changeset: http://git.rtems.org/rtems/commit/?id=3507f3f953cb9be14eea8bf3d03b6e29bba51b98

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Dec 12 15:29:59 2014 +0100

bsp/mpc8xx: Fix warnings

close #2211

---

 c/src/lib/libbsp/powerpc/mbx8xx/ide/pcmcia_ide.c         | 16 ++++++++--------
 c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h            | 12 ++++++++++++
 c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c                | 10 +++++-----
 c/src/lib/libbsp/powerpc/mbx8xx/network/network.c        |  5 +++--
 .../powerpc/mpc8260/console-generic/console-generic.c    |  3 ---
 c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c            |  2 +-
 .../powerpc/mpc8xx/console-generic/console-generic.c     |  8 +-------
 7 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/ide/pcmcia_ide.c b/c/src/lib/libbsp/powerpc/mbx8xx/ide/pcmcia_ide.c
index 66955bd..5ef6773 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/ide/pcmcia_ide.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/ide/pcmcia_ide.c
@@ -39,7 +39,7 @@
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-bool mbx8xx_pcmciaide_probe
+static bool mbx8xx_pcmciaide_probe
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -108,7 +108,7 @@ bool mbx8xx_pcmciaide_probe
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-void mbx8xx_pcmciaide_initialize
+static void mbx8xx_pcmciaide_initialize
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -134,7 +134,7 @@ void mbx8xx_pcmciaide_initialize
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-void mbx8xx_pcmciaide_read_reg
+static void mbx8xx_pcmciaide_read_reg
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -172,7 +172,7 @@ void mbx8xx_pcmciaide_read_reg
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-void mbx8xx_pcmciaide_write_reg
+static void mbx8xx_pcmciaide_write_reg
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -210,7 +210,7 @@ void mbx8xx_pcmciaide_write_reg
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-void mbx8xx_pcmciaide_read_block
+static void mbx8xx_pcmciaide_read_block
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -267,7 +267,7 @@ void mbx8xx_pcmciaide_read_block
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-void mbx8xx_pcmciaide_write_block
+static void mbx8xx_pcmciaide_write_block
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -325,7 +325,7 @@ void mbx8xx_pcmciaide_write_block
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-int mbx8xx_pcmciaide_control
+static int mbx8xx_pcmciaide_control
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
@@ -348,7 +348,7 @@ int mbx8xx_pcmciaide_control
 /*=========================================================================*\
 | Function:                                                                 |
 \*-------------------------------------------------------------------------*/
-rtems_status_code mbx8xx_pcmciaide_config_io_speed
+static rtems_status_code mbx8xx_pcmciaide_config_io_speed
 (
 /*-------------------------------------------------------------------------*\
 | Purpose:                                                                  |
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h b/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h
index 153f7e4..41b13b8 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/include/bsp.h
@@ -73,6 +73,18 @@ extern int rtems_enet_driver_attach (struct rtems_bsdnet_ifconfig *config, int a
  */
 #define RTEMS_BSP_HAS_IDE_DRIVER
 
+extern uint32_t bsp_clock_speed;
+
+char serial_getc(void);
+
+int serial_tstc(void);
+
+void serial_init(void);
+
+int mbx8xx_console_get_configuration(void);
+
+void _InitMBX8xx(void);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c b/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c
index 82be2ba..58bd045 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/irq/irq.c
@@ -63,7 +63,7 @@ const static unsigned int SIU_IvectMask[BSP_SIU_IRQ_NUMBER] =
      0xFFF00000, 0xFFF80000, 0xFFFC0000, 0xFFFE0000
 };
 
-int BSP_irq_enable_at_cpm(const rtems_irq_number irqLine)
+static int BSP_irq_enable_at_cpm(const rtems_irq_number irqLine)
 {
   int cpm_irq_index;
 
@@ -76,7 +76,7 @@ int BSP_irq_enable_at_cpm(const rtems_irq_number irqLine)
   return 0;
 }
 
-int BSP_irq_disable_at_cpm(const rtems_irq_number irqLine)
+static int BSP_irq_disable_at_cpm(const rtems_irq_number irqLine)
 {
   int cpm_irq_index;
 
@@ -146,7 +146,7 @@ volatile unsigned int maxLoop = 0;
 /*
  * High level IRQ handler called from shared_raw_irq_code_entry
  */
-int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
+static int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
 {
   register unsigned int irq;
   register unsigned cpmIntr;                  /* boolean */
@@ -249,7 +249,7 @@ int C_dispatch_irq_handler (BSP_Exception_frame *frame, unsigned int excNum)
   return 0;
 }
 
-void BSP_SIU_irq_init(void)
+static void BSP_SIU_irq_init(void)
 {
   /*
    * In theory we should initialize two registers at least :
@@ -267,7 +267,7 @@ void BSP_SIU_irq_init(void)
 /*
  * Initialize CPM interrupt management
  */
-void
+static void
 BSP_CPM_irq_init(void)
 {
   /*
diff --git a/c/src/lib/libbsp/powerpc/mbx8xx/network/network.c b/c/src/lib/libbsp/powerpc/mbx8xx/network/network.c
index b22e58d..2e4295d 100644
--- a/c/src/lib/libbsp/powerpc/mbx8xx/network/network.c
+++ b/c/src/lib/libbsp/powerpc/mbx8xx/network/network.c
@@ -652,6 +652,7 @@ m8xx_Enet_retire_tx_bd (struct m8xx_enet_struct *sc)
         nRetired--;
         m = sc->txMbuf[sc->txBdTail];
         MFREE (m, n);
+        (void) n;
         if (++sc->txBdTail == sc->txBdCount)
           sc->txBdTail = 0;
       }
@@ -1199,7 +1200,7 @@ fec_sendpacket (struct ifnet *ifp, struct mbuf *m)
 /*
  * Driver transmit daemon
  */
-void
+static void
 scc_txDaemon (void *arg)
 {
   struct m8xx_enet_struct *sc = (struct m8xx_enet_struct *)arg;
@@ -1519,7 +1520,7 @@ fec_ioctl (struct ifnet *ifp, int command, caddr_t data)
 /*
  * Attach an SCC driver to the system
  */
-int
+static int
 rtems_scc1_driver_attach (struct rtems_bsdnet_ifconfig *config)
 {
   struct m8xx_enet_struct *sc;
diff --git a/c/src/lib/libcpu/powerpc/mpc8260/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc8260/console-generic/console-generic.c
index 022e16e..03fd7bf 100644
--- a/c/src/lib/libcpu/powerpc/mpc8260/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc8260/console-generic/console-generic.c
@@ -62,9 +62,6 @@
 #include <bsp/irq.h>
 #include <rtems/bspIo.h>   /* for printk */
 
-/* BSP supplied routine */
-extern int mbx8xx_console_get_configuration(void);
-
 /*
  * Interrupt-driven input buffer
  */
diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
index 0d79883..15b4a14 100644
--- a/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
+++ b/c/src/lib/libcpu/powerpc/mpc8xx/clock/clock.c
@@ -42,6 +42,7 @@
 
 #include <stdlib.h>                     /* for atexit() */
 #include <mpc8xx.h>
+#include <bsp.h>
 
 volatile uint32_t   Clock_driver_ticks;
 extern volatile m8xx_t m8xx;
@@ -49,7 +50,6 @@ extern int BSP_get_clock_irq_level(void);
 extern int BSP_connect_clock_handler(rtems_isr_entry);
 extern int BSP_disconnect_clock_handler(void);
 extern uint32_t bsp_clicks_per_usec;
-extern uint32_t bsp_clock_speed;
 
 /*
  *  Prototypes
diff --git a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
index ba33619..d7fd8b4 100644
--- a/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
+++ b/c/src/lib/libcpu/powerpc/mpc8xx/console-generic/console-generic.c
@@ -50,16 +50,10 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <termios.h>
+#include <bsp.h>
 #include <bsp/irq.h>
 #include <rtems/bspIo.h>   /* for printk */
 
-int BSP_irq_enabled_at_cpm(const rtems_irq_number irqLine);
-
-/* BSP supplied routine */
-extern int mbx8xx_console_get_configuration(void);
-
-extern uint32_t bsp_clock_speed;
-
 /*
  * Interrupt-driven input buffer
  */




More information about the vc mailing list