From: Jingoo Han <jg1.han@samsung.com> Date: Thu, 8 Aug 2013 08:29:48 +0000 (+0900) Subject: serial: samsung: fix casting warning X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9fdedf5d16d04238833d1d45a8e303fdb86bee3a;p=linux.git serial: samsung: fix casting warning port->membase is (unsigned char __iomem *), not (unsigned long *) __set_bit() uses (unsigned long *) as the second argument. Thus, casting (unsigned long *)(unsigned long) is necessary to fix the following sparse warnings. drivers/tty/serial/samsung.c:142:33: warning: cast removes address space of expression drivers/tty/serial/samsung.c:161:33: warning: cast removes address space of expression drivers/tty/serial/samsung.c:176:33: warning: cast removes address space of expression drivers/tty/serial/samsung.c:526:40: warning: cast removes address space of expression Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> --- diff --git a/drivers/tty/serial/samsung.h b/drivers/tty/serial/samsung.h index 00a499ecd385c..aaa617a6c4995 100644 --- a/drivers/tty/serial/samsung.h +++ b/drivers/tty/serial/samsung.h @@ -68,7 +68,8 @@ struct s3c24xx_uart_port { /* register access controls */ #define portaddr(port, reg) ((port)->membase + (reg)) -#define portaddrl(port, reg) ((unsigned long *)((port)->membase + (reg))) +#define portaddrl(port, reg) \ + ((unsigned long *)(unsigned long)((port)->membase + (reg))) #define rd_regb(port, reg) (__raw_readb(portaddr(port, reg))) #define rd_regl(port, reg) (__raw_readl(portaddr(port, reg)))