Skip to content

Commit

Permalink
serial: 8250_dw: Hide a cast in dw8250_serial_inq()
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20240412173937.187442-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Apr 17, 2024
1 parent 6a533ed commit c205edc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/tty/serial/8250/8250_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c205edc

Please sign in to comment.