On Wed, Jul 12, 2017 at 6:44 PM, Aviv Palivoda <pala...@gmail.com> wrote:
> On Wed, Jul 12, 2017 at 07:26:08AM +0200, Frans Klaver wrote:
>> On Tue, Jul 11, 2017 at 9:51 PM, Aviv Palivoda <pala...@gmail.com> wrote:
>> > Fix the following sparse warning:
>> > drivers/staging//wlan-ng/prism2sta.c:1691:20: warning: incorrect type in 
>> > assignment (different base types)
>> >
>> > (a) Change struct hfa384x_authenticate_station_data status member type to 
>> > __le16.
>> > (b) All assignment to status are converted to little-endian prior to 
>> > assignment.
>>
>> Why is this the right thing to do?
>>
>> Frans
>
> In line 1691 the status is converted to little endian:
>     rec.status = cpu_to_le16(rec.status);
> Currently status is u16 but is being converted to __le16 by
> cpu_to_le16. This causes a sparse warning as specified in the commit message.
> Converting all P80211ENUM_status_* to little endian prior to assignment will
> happen by the preprocessor. While the current conversion happens at run time.

That's the rationale for the sparse warning, yes, but does not really
answer my question. Does your change improve readability? Why is
algorithm still u16?
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to