[PATCH 2/2] libbsp/or1ksim: Fix warnings.

Hesham Moustafa heshamelmatary at gmail.com
Mon Oct 13 18:06:00 UTC 2014


Please have a look at this patch.

On Fri, Oct 10, 2014 at 6:45 PM, Hesham ALMatary <heshamelmatary at gmail.com>
wrote:

> ---
>  c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c |  2 +-
>  c/src/lib/libbsp/or1k/or1ksim/console/uart.c   | 15 +++++++++++----
>  2 files changed, 12 insertions(+), 5 deletions(-)
>
> diff --git a/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c
> b/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c
> index ad49d07..4169a11 100644
> --- a/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c
> +++ b/c/src/lib/libbsp/or1k/or1ksim/clock/clockdrv.c
> @@ -137,8 +137,8 @@ CPU_Counter_ticks _CPU_Counter_difference(
>
>  #define Clock_driver_support_install_isr(isr, old_isr) \
>    do {                                                 \
> -    or1ksim_clock_handler_install(isr, old_isr);               \
>      old_isr = NULL;                                    \
> +    or1ksim_clock_handler_install(isr, old_isr);       \
>    } while (0)
>
>  #define Clock_driver_support_shutdown_hardware() or1ksim_clock_cleanup()
> diff --git a/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
> b/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
> index 7ceca81..31cdce6 100644
> --- a/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
> +++ b/c/src/lib/libbsp/or1k/or1ksim/console/uart.c
> @@ -21,6 +21,14 @@
>  #include <bsp/uart.h>
>  #include <rtems/score/isr.h>
>
> +static void uart_initialize(int minor);
> +static int  uart_first_open(int major, int minor, void *arg);
> +static int  uart_last_close(int major, int minor, void *arg);
> +static int  uart_read_polled(int minor);
> +static ssize_t uart_write(int minor, const char *buf, size_t len);
> +static void uart_write_polled(int minor, char c);
> +static int  uart_set_attributes(int minor, const struct termios *t);
> +
>  static rtems_vector_number uart_get_irq_number(const console_tbl *ct)
>  {
>     return ct->ulIntVector;
> @@ -86,10 +94,9 @@ static int uart_last_close(int major, int minor, void
> *arg)
>    return 0;
>  }
>
> -static char uart_read_polled(int minor)
> +static int uart_read_polled(int minor)
>  {
>    unsigned char lsr;
> -  char c;
>
>   /* Get a character when avaiable */
>    do {
> @@ -120,7 +127,7 @@ static void uart_write_polled(int minor, char c)
>    } while ( (lsr & transmit_finished) != transmit_finished );
>  }
>
> -static ssize_t uart_write_support_polled(
> +static ssize_t uart_write(
>    int minor,
>    const char *s,
>    size_t n
> @@ -145,7 +152,7 @@ const console_fns or1ksim_uart_fns = {
>    .deviceFirstOpen = uart_first_open,
>    .deviceLastClose = uart_last_close,
>    .deviceRead = uart_read_polled,
> -  .deviceWrite = uart_write_support_polled,
> +  .deviceWrite = uart_write,
>    .deviceInitialize = uart_initialize,
>    .deviceWritePolled = uart_write_polled,
>    .deviceSetAttributes = uart_set_attributes,
> --
> 1.9.3
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20141013/7c8f9bc4/attachment-0002.html>


More information about the devel mailing list