> In file drivers/net/wireless/p54/p54common.c, the statement
> > priv->rx_mtu = (size_t) le16_to_cpu((__le16)bootrec->data[10]);
[I don't see this code in Linus's tree]
the code in question looks buggy to me. Since bootrec->data[10] is u32,
casting it to a 16-bit type is going to take a different 2 bytes out of
the 4 bytes depending on the endianness of the system the driver is
built for. And I assume you are parsing some fixed-layout thing that
the firmware is giving you or something like that.
I would guess you want something like:
priv->rx_mtu = le16_to_cpu(((__force __le16 *) bootrec->data)[20]);
(__force is what shuts up sparse, and as far as I can see, the size_t
cast is useless, since the result will be promoted anyway)