Search Linux Wireless

Re: [PATCH] staging: rtl8723au: use proper typecast in assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anatoly Stepanov <drivengroove@xxxxxxxxx> writes:
> This resolves the following Sparse warning:
> "incorrect type in assignment (different base types)"
>
> Signed-off-by: Anatoly Stepanov <drivengroove@xxxxxxxxx>
> ---
>  drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
> index 1662c03c..fdd9cf1 100644
> --- a/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
> +++ b/drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
> @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux