Skip to content

Commit c205edc

Browse files
andy-shevgregkh
authored andcommitted
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]>
1 parent 6a533ed commit c205edc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/tty/serial/8250/8250_dw.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,7 @@ static unsigned int dw8250_serial_in(struct uart_port *p, int offset)
185185
#ifdef CONFIG_64BIT
186186
static unsigned int dw8250_serial_inq(struct uart_port *p, int offset)
187187
{
188-
unsigned int value;
189-
190-
value = (u8)__raw_readq(p->membase + (offset << p->regshift));
188+
u8 value = __raw_readq(p->membase + (offset << p->regshift));
191189

192190
return dw8250_modify_msr(p, offset, value);
193191
}

0 commit comments

Comments
 (0)