staging: rtl8723au: use proper typecast in assignment
PATCH 1/1 staging: rtl8723au: use proper typecast in assignment
This resolves the following Sparse warning:
"incorrect type in assignment (different base types)"
Signed-off-by Anatoly Stepanov <[email protected]>
--- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +1 -1
@@ -115,7 +115,7 @@ exit:int rtl8723a_set_rssi_cmd (struct rtw_adapter *padapter,u8 *param) { - *((u32 *)param) =cpu_to_le32 (*((u32 *)param)); + *((__le32 *)param) =cpu_to_le32 (*((u32 *)param));FillH2CCmd (padapter,RSSI_SETTING_EID ,3 , param);
Signature · 1 line
1.9.1
Quoted 13 lines · Anatoly Stepanov
This resolves the following Sparse warning:
"incorrect type in assignment (different base types)"Signed-off-by Anatoly Stepanov <[email protected]>--- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +0
-0
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c exit: · line 120
Quoted 7 lines
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c +1
-1@@ -115,7 +115,7 @@ exit:int rtl8723a_set_rssi_cmd (struct rtw_adapter *padapter,u8 *param) { - *((u32 *)param) =cpu_to_le32 (*((u32 *)param)); + *((__le32 *)param) =cpu_to_le32 (*((u32 *)param));FillH2CCmd (padapter,RSSI_SETTING_EID ,3 , param);
*Cough*
Writing a 32 bit value to a pointer to a u8 is ugly in the first place. Rather than just wrapping it in yet another ugly typecast, please fix this properly.
Jes