I need help with a sparse warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Larry Finger
Date: Thursday, September 11, 2008 - 7:13 pm

In file drivers/net/wireless/p54/p54common.c, the statement

        priv->rx_mtu = (size_t) le16_to_cpu((__le16)bootrec->data[10]);

generates the sparse warning

.../p54common.c:185:29: warning: cast to restricted __le16

where bootrec->data is u32, and priv->rx_mtu is u16.

What should be done to eliminate this warning?

Thanks,

Larry

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
I need help with a sparse warning, Larry Finger, (Thu Sep 11, 7:13 pm)
Re: I need help with a sparse warning, Steven Noonan, (Thu Sep 11, 7:32 pm)
Re: I need help with a sparse warning, Roland Dreier, (Thu Sep 11, 7:39 pm)
Re: I need help with a sparse warning, Alexey Dobriyan, (Thu Sep 11, 7:44 pm)
Re: I need help with a sparse warning, Larry Finger, (Thu Sep 11, 7:58 pm)
Re: I need help with a sparse warning, Roland Dreier, (Thu Sep 11, 8:04 pm)
Re: I need help with a sparse warning, Larry Finger, (Thu Sep 11, 8:05 pm)
Re: I need help with a sparse warning, Larry Finger, (Thu Sep 11, 8:07 pm)
Re: I need help with a sparse warning, Michael Buesch, (Fri Sep 12, 8:25 am)
Re: I need help with a sparse warning, Pavel Roskin, (Fri Sep 12, 10:12 am)