]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 Sep 2021 08:09:24 +0000 (10:09 +0200)
commit7432ecc55fe956e896aff1c62dea981949d1bcff
tree52ca01d3fab6ebcf47414af82c6adb6f46237418
parent29c70b0d335a2f5d1a8a2e7dad2b50f80d71b8aa
m68k: Double cast io functions to unsigned long

[ Upstream commit b1a89856fbf63fffde6a4771d8f1ac21df549e50 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/m68k/include/asm/raw_io.h