[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230803095816.110864-1-jorge.sanjuangarcia@duagon.com>
Date: Thu, 3 Aug 2023 09:59:07 +0000
From: Sanjuán García, Jorge
<Jorge.SanjuanGarcia@...gon.com>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
CC: Rodríguez Barbarin, José Javier
<JoseJavier.Rodriguez@...gon.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
Sanjuán García, Jorge
<Jorge.SanjuanGarcia@...gon.com>, kernel test robot <lkp@...el.com>
Subject: [PATCH] 8250_men_mcb: remove unnecessary cast when reading register
Fixes following sparse warning:
drivers/tty/serial/8250/8250_men_mcb.c:92:21: sparse: cast removes
address space '__iomem' of expression
drivers/tty/serial/8250/8250_men_mcb.c:92:21: sparse: incorrect type
in argument 1 (different address spaces) expected void const volatile
[noderef] __iomem *addr got void *
Fixes: 2554e6ba28a2 ("8250_men_mcb: Read num ports from register data.")
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202307261517.x1O9OAkd-lkp@intel.com/
Signed-off-by: Jorge Sanjuan Garcia <jorge.sanjuangarcia@...gon.com>
---
drivers/tty/serial/8250/8250_men_mcb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250_men_mcb.c b/drivers/tty/serial/8250/8250_men_mcb.c
index 5f301195575d..72f9ee5dd274 100644
--- a/drivers/tty/serial/8250/8250_men_mcb.c
+++ b/drivers/tty/serial/8250/8250_men_mcb.c
@@ -40,7 +40,7 @@
#define MEN_UART3_OFFSET (MEN_UART2_OFFSET + MEN_UART_MEM_SIZE)
#define MEN_UART4_OFFSET (MEN_UART3_OFFSET + MEN_UART_MEM_SIZE)
-#define MEN_READ_REGISTER(addr) readb((void *)addr)
+#define MEN_READ_REGISTER(addr) readb(addr)
#define MAX_PORTS 4
--
2.34.1
Powered by blists - more mailing lists