From: Baolin Wang <baolin.wang@linaro.org>
To: gregkh@linuxfoundation.org, jslaby@suse.com
Cc: orsonzhai@gmail.com, baolin.wang@linaro.org,
zhang.lyra@gmail.com, broonie@kernel.org,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] serial: sprd: Change 'int' to 'unsigned int'
Date: Fri, 10 Aug 2018 18:34:26 -0700 [thread overview]
Message-ID: <59172367ea674d5d4a3bd7c4d52362445174536e.1533950271.git.baolin.wang@linaro.org> (raw)
In-Reply-To: <50e1f7f4673bff9d71936b4eb34cbf2571b0fda9.1533950271.git.baolin.wang@linaro.org>
In-Reply-To: <50e1f7f4673bff9d71936b4eb34cbf2571b0fda9.1533950271.git.baolin.wang@linaro.org>
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>
---
drivers/tty/serial/sprd_serial.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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;
--
1.9.1
next prev parent reply other threads:[~2018-08-11 1:35 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-11 1:34 [PATCH 1/5] serial: sprd: Remove unused structure Baolin Wang
2018-08-11 1:34 ` [PATCH 2/5] serial: sprd: Use readable macros instead of magic number Baolin Wang
2018-09-04 6:54 ` Chunyan Zhang
2018-08-11 1:34 ` [PATCH 3/5] serial: sprd: Remove unnecessary resource validation Baolin Wang
2018-09-04 6:55 ` Chunyan Zhang
2018-08-11 1:34 ` Baolin Wang [this message]
2018-09-04 6:55 ` [PATCH 4/5] serial: sprd: Change 'int' to 'unsigned int' Chunyan Zhang
2018-08-11 1:34 ` [PATCH 5/5] serial: sprd: Fix the indentation issue Baolin Wang
2018-09-04 6:57 ` Chunyan Zhang
2018-09-04 5:34 ` [PATCH 1/5] serial: sprd: Remove unused structure Baolin Wang
2018-09-04 6:52 ` Chunyan Zhang
2018-09-11 6:09 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59172367ea674d5d4a3bd7c4d52362445174536e.1533950271.git.baolin.wang@linaro.org \
--to=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=zhang.lyra@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.