diff mbox

staging: rtl8723au: fix sparse warning

Message ID 1432357384-16665-1-git-send-email-juston.h.li@gmail.com (mailing list archive)
State Not Applicable
Delegated to: Kalle Valo
Headers show

Commit Message

Juston Li May 23, 2015, 5:03 a.m. UTC
change cast to __le16 to fix the following warning:
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16

Signed-off-by: Juston Li <juston.h.li@gmail.com>
---
 drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jes Sorensen May 26, 2015, 2:10 p.m. UTC | #1
Juston Li <juston.h.li@gmail.com> writes:
> change cast to __le16 to fix the following warning:
> drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c:1488:20: warning: cast to restricted __le16
>
> Signed-off-by: Juston Li <juston.h.li@gmail.com>
> ---
>  drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Looks OK to me

Jes

>
> diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> index 04d0183..e23af8e 100644
> --- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> +++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
> @@ -1485,7 +1485,7 @@ void Hal_EfuseParseIDCode(struct rtw_adapter *padapter, u8 *hwinfo)
>  	u16 EEPROMId;
>  
>  	/*  Checl 0x8129 again for making sure autoload status!! */
> -	EEPROMId = le16_to_cpu(*((u16 *) hwinfo));
> +	EEPROMId = le16_to_cpu(*((__le16 *) hwinfo));
>  	if (EEPROMId != RTL_EEPROM_ID) {
>  		DBG_8723A("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
>  		pEEPROM->bautoload_fail_flag = true;
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
index 04d0183..e23af8e 100644
--- a/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
+++ b/drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
@@ -1485,7 +1485,7 @@  void Hal_EfuseParseIDCode(struct rtw_adapter *padapter, u8 *hwinfo)
 	u16 EEPROMId;
 
 	/*  Checl 0x8129 again for making sure autoload status!! */
-	EEPROMId = le16_to_cpu(*((u16 *) hwinfo));
+	EEPROMId = le16_to_cpu(*((__le16 *) hwinfo));
 	if (EEPROMId != RTL_EEPROM_ID) {
 		DBG_8723A("EEPROM ID(%#x) is invalid!!\n", EEPROMId);
 		pEEPROM->bautoload_fail_flag = true;