[PATCH 04/42] m68k/mvme147: Fix warnings

Joel Sherrill joel.sherrill at oarcorp.com
Fri Oct 17 15:23:20 UTC 2014


---
 c/src/lib/libbsp/m68k/mvme147/console/console.c  | 61 ++----------------------
 c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c | 18 ++++---
 c/src/lib/libbsp/m68k/mvme147/timer/timer.c      |  2 +-
 3 files changed, 17 insertions(+), 64 deletions(-)

diff --git a/c/src/lib/libbsp/m68k/mvme147/console/console.c b/c/src/lib/libbsp/m68k/mvme147/console/console.c
index e605996..389d5b4 100644
--- a/c/src/lib/libbsp/m68k/mvme147/console/console.c
+++ b/c/src/lib/libbsp/m68k/mvme147/console/console.c
@@ -1,6 +1,8 @@
 /*
  *  This file contains the MVME147 console IO package.
- *
+ */
+
+/*
  *  COPYRIGHT (c) 1989-1999.
  *  On-Line Applications Research Corporation (OAR).
  *
@@ -24,14 +26,7 @@
 /*  console_initialize
  *
  *  This routine initializes the console IO driver.
- *
- *  Input parameters: NONE
- *
- *  Output parameters:  NONE
- *
- *  Return values:
  */
-
 rtems_device_driver console_initialize(
   rtems_device_major_number  major,
   rtems_device_minor_number  minor,
@@ -52,46 +47,11 @@ rtems_device_driver console_initialize(
   return RTEMS_SUCCESSFUL;
 }
 
-/*  is_character_ready
- *
- *  This routine returns TRUE if a character is available.
- *
- *  Input parameters: NONE
- *
- *  Output parameters:  NONE
- *
- *  Return values:
- */
-
-bool is_character_ready(
-  char *ch
-)
-{
-  uint8_t         rr_0;
-
-  for ( ; ; ) {
-    Z8x30_READ_CONTROL( CONSOLE_CONTROL, RR_0, rr_0 );
-    if ( !(rr_0 & RR_0_RX_DATA_AVAILABLE) )
-      return false;
-
-    Z8x30_READ_DATA( CONSOLE_DATA, *ch );
-    return true;
-  }
-}
-
 /*  inbyte
  *
  *  This routine reads a character from the SCC.
- *
- *  Input parameters: NONE
- *
- *  Output parameters:  NONE
- *
- *  Return values:
- *    character read from SCC
  */
-
-char inbyte( void )
+static char inbyte( void )
 {
   uint8_t         rr_0;
   char ch;
@@ -110,14 +70,8 @@ char inbyte( void )
  *
  *  This routine transmits a character out the SCC.  It supports
  *  XON/XOFF flow control.
- *
- *  Input parameters:
- *    ch  - character to be transmitted
- *
- *  Output parameters:  NONE
  */
-
-void outbyte(
+static void outbyte(
   char ch
 )
 {
@@ -152,7 +106,6 @@ void outbyte(
 /*
  *  Open entry point
  */
-
 rtems_device_driver console_open(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
@@ -165,7 +118,6 @@ rtems_device_driver console_open(
 /*
  *  Close entry point
  */
-
 rtems_device_driver console_close(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
@@ -178,7 +130,6 @@ rtems_device_driver console_close(
 /*
  * read bytes from the serial port. We only have stdin.
  */
-
 rtems_device_driver console_read(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
@@ -210,7 +161,6 @@ rtems_device_driver console_read(
 /*
  * write bytes to the serial port. Stdout and stderr are the same.
  */
-
 rtems_device_driver console_write(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
@@ -241,7 +191,6 @@ rtems_device_driver console_write(
 /*
  *  IO Control entry point
  */
-
 rtems_device_driver console_control(
   rtems_device_major_number major,
   rtems_device_minor_number minor,
diff --git a/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c b/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c
index dfeb82e..36c3317 100644
--- a/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c
+++ b/c/src/lib/libbsp/m68k/mvme147/startup/bspclean.c
@@ -1,7 +1,9 @@
 /*
  *  This routine returns control to 147Bug.
- *
- *  COPYRIGHT (c) 1989-2010.
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2014.
  *  On-Line Applications Research Corporation (OAR).
  *
  *  The license and distribution terms for this file may be
@@ -16,16 +18,18 @@
 #include <bsp.h>
 #include <bsp/bootcard.h>
 
-extern void start( void  );
+extern void start(void);
 
-void bsp_return_to_monitor_trap(void)
+static rtems_isr bsp_return_to_monitor_trap(
+  rtems_vector_number vector
+)
 {
   register volatile void *start_addr;
 
-  m68k_set_vbr( 0 );                /* restore 147Bug vectors */
+  m68k_set_vbr( 0 );                    /* restore 147Bug vectors */
   __asm__ volatile( "trap   #15"  );    /* trap to 147Bug */
   __asm__ volatile( ".short 0x63" );    /* return to 147Bug (.RETURN) */
-                                    /* restart program */
+                                        /* restart program */
   start_addr = start;
 
   __asm__ volatile ( "jmp %0@" : "=a" (start_addr) : "0" (start_addr) );
@@ -41,5 +45,5 @@ void bsp_fatal_extension(
    pcc->timer2_int_control = 0; /* Disable Timer 2 */
 
    M68Kvec[ 45 ] = bsp_return_to_monitor_trap;   /* install handler */
-   __asm__ volatile( "trap #13" );  /* ensures SUPV mode */
+   __asm__ volatile( "trap #13" );               /* ensures SUPV mode */
 }
diff --git a/c/src/lib/libbsp/m68k/mvme147/timer/timer.c b/c/src/lib/libbsp/m68k/mvme147/timer/timer.c
index 1db32c5..9d48fa7 100644
--- a/c/src/lib/libbsp/m68k/mvme147/timer/timer.c
+++ b/c/src/lib/libbsp/m68k/mvme147/timer/timer.c
@@ -23,7 +23,7 @@
 int Ttimer_val;
 bool benchmark_timer_find_average_overhead;
 
-rtems_isr_entry timerisr(rtems_vector_number);
+rtems_isr timerisr(rtems_vector_number);
 
 void benchmark_timer_initialize(void)
 {
-- 
1.9.3




More information about the devel mailing list