Skip to content

Commit

Permalink
serial: sprd: Change 'int' to 'unsigned int'
Browse files Browse the repository at this point in the history
The register offset value should be 'unsigned int' type.

Moreover, prefer 'unsigned int' to bare use of 'unsigned'.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Baolin Wang authored and Greg Kroah-Hartman committed Sep 18, 2018
1 parent 262d3dc commit dd22161
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions drivers/tty/serial/sprd_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit dd22161

Please sign in to comment.