m68k: Double cast io functions to unsigned long
authorGuenter Roeck <linux@roeck-us.net>
Tue, 7 Sep 2021 06:07:29 +0000 (23:07 -0700)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 13 Sep 2021 09:19:05 +0000 (11:19 +0200)
commit90fc48ebb3af716f001f657d45ac41cd5f77ef29
tree494305f0a44a8596b6e6997e0c0438c8f187c18d
parent4ce062870c70d404088bf50de34ea03772413b4e
m68k: Double cast io functions to unsigned long

m68k builds fail widely with errors such as

arch/m68k/include/asm/raw_io.h:20:19: error:
cast to pointer from integer of different size
arch/m68k/include/asm/raw_io.h:30:32: error:
cast to pointer from integer of different size [-Werror=int-to-p

On m68k, io functions are defined as macros. The problem is seen if the
macro parameter variable size differs from the size of a pointer. Cast
the parameter of all io macros to unsigned long before casting it to
a pointer to fix the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20210907060729.2391992-1-linux@roeck-us.net
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/include/asm/raw_io.h