* [PATCH v1 1/1] serial: 8250_dw: Hide a cast in dw8250_serial_inq()
@ 2024-04-12 17:39 Andy Shevchenko
0 siblings, 0 replies; only message in thread
From: Andy Shevchenko @ 2024-04-12 17:39 UTC (permalink / raw)
To: Andy Shevchenko, linux-kernel, linux-serial
Cc: Ilpo Järvinen, Greg Kroah-Hartman, Jiri Slaby
dw8250_serial_inq() uses unsigned int variable to store 8-bit value.
Due to that it needs a cast which can be avoided by switching to use
u8 instead of unsigned int.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/tty/serial/8250/8250_dw.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 1e81024f8fd3..ba9f4dc4e71d 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -185,9 +185,7 @@ static unsigned int dw8250_serial_in(struct uart_port *p, int offset)
#ifdef CONFIG_64BIT
static unsigned int dw8250_serial_inq(struct uart_port *p, int offset)
{
- unsigned int value;
-
- value = (u8)__raw_readq(p->membase + (offset << p->regshift));
+ u8 value = __raw_readq(p->membase + (offset << p->regshift));
return dw8250_modify_msr(p, offset, value);
}
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-12 17:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 17:39 [PATCH v1 1/1] serial: 8250_dw: Hide a cast in dw8250_serial_inq() Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®