lkml.org 
[lkml]   [2017]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2] staging: rtl8712: rtl8712: fixed missing conversion to le32
On Thu, Feb 09, 2017 at 10:18:42AM +0000, Carlos Palminha wrote:
> Fixed missing conversion to le32, detected by sparse
> (invalid assignment from int to __le32)
>
> Signed-off-by: Carlos Palminha <palminha@synopsys.com>
> ---
> v1->v2:
> missed sob line (too late in the night...)
>
> drivers/staging/rtl8712/rtl8712_xmit.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
> index 041508d6ec6d..4231a0a83097 100644
> --- a/drivers/staging/rtl8712/rtl8712_xmit.c
> +++ b/drivers/staging/rtl8712/rtl8712_xmit.c
> @@ -573,7 +573,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz)
> }
> } else if (pxmitframe->frame_tag == MGNT_FRAMETAG) {
> /* offset 4 */
> - ptxdesc->txdw1 |= (0x05) & 0x1f;/*CAM_ID(MAC_ID), default=5;*/
> + ptxdesc->txdw1 |= cpu_to_le32((0x05) & 0x1f);/*CAM_ID(MAC_ID), default=5;*/

This looks reasonable but it's probably cleaner to say something like:

ptxdesc->txdw1 |= cpu_to_le32(0x05); /*CAM_ID(MAC_ID), default=5;*/

regards,
dan carpenter

\
 
 \ /
  Last update: 2017-02-10 18:13    [W:0.038 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site