[U-Boot-Users] [PATCH] Remove warnings compiling serial_xuartlite.c
Grant Likely
grant.likely at secretlab.ca
Wed Jul 16 15:55:40 CEST 2008
On Wed, Jul 16, 2008 at 03:01:33AM +0200, Ricardo Ribalda Delgado wrote:
> diff --git a/drivers/serial/serial_xuartlite.c b/drivers/serial/serial_xuartlite.c
> index 5c41a1c..2e6f096 100644
> --- a/drivers/serial/serial_xuartlite.c
> +++ b/drivers/serial/serial_xuartlite.c
> @@ -37,9 +37,9 @@
> #define SR_RX_FIFO_VALID_DATA 0x01 /* data in receive FIFO */
> #define SR_RX_FIFO_FULL 0x02 /* receive FIFO full */
>
> -#define UARTLITE_STATUS (CONFIG_SERIAL_BASE + STATUS_REG_OFFSET)
> -#define UARTLITE_TX_FIFO (CONFIG_SERIAL_BASE + TX_FIFO_OFFSET)
> -#define UARTLITE_RX_FIFO (CONFIG_SERIAL_BASE + RX_FIFO_OFFSET)
> +#define UARTLITE_STATUS (u32*)(CONFIG_SERIAL_BASE + STATUS_REG_OFFSET)
> +#define UARTLITE_TX_FIFO (u32*)(CONFIG_SERIAL_BASE + TX_FIFO_OFFSET)
> +#define UARTLITE_RX_FIFO (u32*)(CONFIG_SERIAL_BASE + RX_FIFO_OFFSET)
Nak. Fix the code instead. These constants are correct and should
not be pre-cast in the macro.
g.
More information about the U-Boot
mailing list