Greg KH <g...@kroah.com> writes:
> On Sun, Aug 17, 2014 at 10:19:28AM -0300, Raphael Silva wrote:
>>  Type casting corrections in order to solve warnings of the sparce static 
>> analyser.
>> 
>> Signed-off-by: Raphael Silva <rapp...@gmail.com>
>> ---
>>  drivers/staging/rtl8723au/hal/usb_halinit.c       | 4 ++--
>>  drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c | 2 +-
>>  2 files changed, 3 insertions(+), 3 deletions(-)
>> 
>> diff --git a/drivers/staging/rtl8723au/hal/usb_halinit.c 
>> b/drivers/staging/rtl8723au/hal/usb_halinit.c
>> index b49bf33..969e4f3 100644
>> --- a/drivers/staging/rtl8723au/hal/usb_halinit.c
>> +++ b/drivers/staging/rtl8723au/hal/usb_halinit.c
>> @@ -1228,9 +1228,9 @@ static void Hal_EfuseParsePIDVID_8723AU(struct 
>> rtw_adapter *pAdapter,
>>      } else {
>>              /*  VID, PID */
>>              pHalData->EEPROMVID =
>> -                    le16_to_cpu(*(u16 *)&hwinfo[EEPROM_VID_8723AU]);
>> +                    le16_to_cpu(*(__le16 *)&hwinfo[EEPROM_VID_8723AU]);
>
> Shouldn't the structure bt of type __le16 so that there is no warning
> here?

We can't really make it an array of __le16 as it's the content of the
EEPROM and it contains various different elements. To get it right, it
would require defining it as a struct and declaring the various elements
correctly within the struct.

However we could get rid of this portion completely since
pHalData->EEPROM[PV]ID aren't used for anything in the code, besides
printing the values in debug mode.

Cheers,
Jes
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to