* [PATCH] staging: rtl8723au: use proper typecast in assignment
@ 2015-12-14 23:40 Anatoly Stepanov
2015-12-15 15:53 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Anatoly Stepanov @ 2015-12-14 23:40 UTC (permalink / raw)
To: Larry.Finger, Jes.Sorensen, gregkh; +Cc: linux-wireless, Anatoly Stepanov
This resolves the following Sparse warning:
"incorrect type in assignment (different base types)"
Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
---
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);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723au: use proper typecast in assignment
2015-12-14 23:40 [PATCH] staging: rtl8723au: use proper typecast in assignment Anatoly Stepanov
@ 2015-12-15 15:53 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2015-12-15 15:53 UTC (permalink / raw)
To: Anatoly Stepanov; +Cc: Larry.Finger, gregkh, linux-wireless
Anatoly Stepanov <drivengroove@gmail.com> writes:
> This resolves the following Sparse warning:
> "incorrect type in assignment (different base types)"
>
> Signed-off-by: Anatoly Stepanov <drivengroove@gmail.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-15 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 23:40 [PATCH] staging: rtl8723au: use proper typecast in assignment Anatoly Stepanov
2015-12-15 15:53 ` Jes Sorensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).