Re: [PATCH] m68k: Double cast io functions to unsigned long

From: Geert Uytterhoeven
Date: Tue Sep 07 2021 - 08:50:20 EST


On Tue, Sep 7, 2021 at 8:07 AM Guenter Roeck <linux@xxxxxxxxxxxx> wrote:
> 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@xxxxxxxxxxxx>

Reviewed-by: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
i.e. will queue in the m68k fixes branch.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds