From: Andy Shevchenko Date: Tue, 2 Apr 2024 19:50:30 +0000 (+0300) Subject: serial: max3100: Fix bitwise types X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e60955dbecb97f080848a57524827e2db29c70fd;p=linux.git serial: max3100: Fix bitwise types Sparse is not happy about misuse of bitwise types: .../max3100.c:194:13: warning: incorrect type in assignment (different base types) .../max3100.c:194:13: expected unsigned short [addressable] [usertype] etx .../max3100.c:194:13: got restricted __be16 [usertype] .../max3100.c:202:15: warning: cast to restricted __be16 Fix this by choosing proper types for the respective variables. Fixes: 7831d56b0a35 ("tty: MAX3100") Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20240402195306.269276-4-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c index 14873576e52db..8c6eaf908bce9 100644 --- a/drivers/tty/serial/max3100.c +++ b/drivers/tty/serial/max3100.c @@ -45,6 +45,9 @@ #include #include #include +#include + +#include #include @@ -191,7 +194,7 @@ static void max3100_timeout(struct timer_list *t) static int max3100_sr(struct max3100_port *s, u16 tx, u16 *rx) { struct spi_message message; - u16 etx, erx; + __be16 etx, erx; int status; struct spi_transfer tran = { .tx_buf = &etx,