Re: [PATCH] net: via-rhine: fix compiler warning

From: Alexey Charkov
Date: Tue Apr 29 2014 - 14:09:09 EST


2014-04-29 21:36 GMT+04:00 Jan Moskyto Matejka <mq@xxxxxxx>:
> Fixed different size cast warning:
>
> drivers/net/ethernet/via/via-rhine.c: In function ârhine_init_one_platformâ:
> drivers/net/ethernet/via/via-rhine.c:1132:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> revision = (u32)match->data;
> ^
>
> That code was added in commit 2d283862dc62daead9db0dc89cd0d0351e91f765
> ("net: via-rhine: add OF bus binding").
>
> Signed-off-by: Jan Moskyto Matejka <mq@xxxxxxx>

Jan, thanks a lot for catching this. Have to admit that I didn't
compile it on 64bit.

Acked-by: Alexey Charkov <alchark@xxxxxxxxx>

Looks like the same would apply to e.g. drivers/clk/samsung/clk.c and
maybe some others... Also, a number of drivers cast OF data from (void
*) to (int) or (unsigned int) - isn't this also problematic on 64bit?

Thanks a lot,
Alexey
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/