From: Baolin Wang Date: Mon, 17 Sep 2018 18:33:43 +0000 (-0700) Subject: serial: sprd: Change 'int' to 'unsigned int' X-Git-Tag: v5.4-rc1~2323^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd22161eef8b19930aa4439722940f44e2aff521;p=platform%2Fkernel%2Flinux-rpi.git serial: sprd: Change 'int' to 'unsigned int' The register offset value should be 'unsigned int' type. Moreover, prefer 'unsigned int' to bare use of 'unsigned'. Signed-off-by: Baolin Wang Acked-by: Chunyan Zhang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/sprd_serial.c b/drivers/tty/serial/sprd_serial.c index 03b0cd4..8d5c9cd 100644 --- a/drivers/tty/serial/sprd_serial.c +++ b/drivers/tty/serial/sprd_serial.c @@ -109,12 +109,14 @@ struct sprd_uart_port { static struct sprd_uart_port *sprd_port[UART_NR_MAX]; static int sprd_ports_num; -static inline unsigned int serial_in(struct uart_port *port, int offset) +static inline unsigned int serial_in(struct uart_port *port, + unsigned int offset) { return readl_relaxed(port->membase + offset); } -static inline void serial_out(struct uart_port *port, int offset, int value) +static inline void serial_out(struct uart_port *port, unsigned int offset, + int value) { writel_relaxed(value, port->membase + offset); } @@ -598,8 +600,7 @@ static void sprd_putc(struct uart_port *port, int c) writeb(c, port->membase + SPRD_TXD); } -static void sprd_early_write(struct console *con, const char *s, - unsigned n) +static void sprd_early_write(struct console *con, const char *s, unsigned int n) { struct earlycon_device *dev = con->data;