diff options
author | Andy Shevchenko <[email protected]> | 2024-04-12 20:39:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-04-17 13:14:09 +0200 |
commit | c205edcd86dac01c205e4eadf6d0d95965e7a566 (patch) | |
tree | 03adc17e20cd26484d71ce9fe5b92b21423421c8 | |
parent | 6a533ed7350af50322a7e478a6557f1368222ea3 (diff) |
serial: 8250_dw: Hide a cast in dw8250_serial_inq()
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/tty/serial/8250/8250_dw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c index 994604c77058..db0e67186a8b 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); } |