staging: rtl8712: rtl8712: fix sparse warnings
PATCH 1/1 staging: rtl8712: rtl8712: fix sparse warnings
Fixed the following sparse warnings:
* cast from restricted __le32
* invalid assignment from int to __le32
--- drivers/staging/rtl8712/rtl8712_xmit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8712/rtl8712_xmit.c +4 -4
@@ -561,19 +561,19 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) ptxdesc_mp = &txdesc_mp;/* offset 8 */ - ptxdesc->txdw2 =cpu_to_le32 (ptxdesc_mp->txdw2); + ptxdesc->txdw2 = ptxdesc_mp->txdw2;if (bmcst) ptxdesc->txdw2 |=cpu_to_le32 (BMC ); ptxdesc->txdw2 |=cpu_to_le32 (BK );/* offset 16 */ - ptxdesc->txdw4 =cpu_to_le32 (ptxdesc_mp->txdw4); + ptxdesc->txdw4 = ptxdesc_mp->txdw4;/* offset 20 */ - ptxdesc->txdw5 =cpu_to_le32 (ptxdesc_mp->txdw5); + ptxdesc->txdw5 = ptxdesc_mp->txdw5; pattrib->pctrl =0 ;/* reset to zero; */ } }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;*/ qsel = (uint)(pattrib->qsel &0x0000001f ); ptxdesc->txdw1 |=cpu_to_le32 ((qsel <<QSEL_SHT ) &0x00001f00 ); ptxdesc->txdw1 |=cpu_to_le32 (BIT (16 ));/* Non-QoS */
--
2.11.0
Quoted 4 lines · Carlos Palminha
Fixed the following sparse warnings:
* cast from restricted__le32
* invalid assignment from int to__le32
The changelog doesn't give me any confidence that you understand the implications of this patch. You silenced the warning but I think you may be introducing bugs (I haven't done a thourough review).
regards,
dan carpenter
Quoted 6 lines · Dan Carpenter
Quoted 4 lines · Carlos Palminha
Fixed the following sparse warnings:
* cast from restricted__le32
* invalid assignment from int to__le32
Quoted 7 lines
The changelog doesn't give me any confidence that you understand the implications of this patch. You silenced the warning but I think you may be introducing bugs (I haven't done a thourough review).
regards,
dan carpenter
true... i was short on words.
will resend v2 with better description.
Regards,
C.Palminha
Quoted 13 lines · Carlos Palminha
Quoted 10 lines · Dan Carpenter
Quoted 4 lines · Carlos Palminha
Fixed the following sparse warnings:
* cast from restricted__le32
* invalid assignment from int to__le32The changelog doesn't give me any confidence that you understand the implications of this patch. You silenced the warning but I think you may be introducing bugs (I haven't done a thourough review).
Quoted 5 lines
Quoted 3 lines
regards,
dan carpentertrue... i was short on words.
will resend v2 with better description.
I'm pretty sure the original code is correct and just the sparse annotations are wrong.
regards,
dan carpenter