Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1576195 > unrolled thread
| Started by | Carlos Palminha <CARLOS.PALMINHA@synopsys.com> |
|---|---|
| First post | 2017-02-08 01:50 +0100 |
| Last post | 2017-02-08 07:20 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] staging: rtl8712: rtl8712: fix sparse warnings Carlos Palminha <CARLOS.PALMINHA@synopsys.com> - 2017-02-08 01:50 +0100
Re: [PATCH] staging: rtl8712: rtl8712: fix sparse warnings Dan Carpenter <dan.carpenter@oracle.com> - 2017-02-08 02:00 +0100
Re: [PATCH] staging: rtl8712: rtl8712: fix sparse warnings Carlos Palminha <CARLOS.PALMINHA@synopsys.com> - 2017-02-08 02:20 +0100
Re: [PATCH] staging: rtl8712: rtl8712: fix sparse warnings Dan Carpenter <dan.carpenter@oracle.com> - 2017-02-08 07:20 +0100
| From | Carlos Palminha <CARLOS.PALMINHA@synopsys.com> |
|---|---|
| Date | 2017-02-08 01:50 +0100 |
| Subject | [PATCH] staging: rtl8712: rtl8712: fix sparse warnings |
| Message-ID | <t8oCl-1zo-1@gated-at.bofh.it> |
Fixed the following sparse warnings:
* cast from restricted __le32
* invalid assignment from int to __le32
Signed-off-by: Carlos Palminha <palminha@synopsys.com>
---
drivers/staging/rtl8712/rtl8712_xmit.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c
index c4f03a602a2e..67713643c923 100644
--- a/drivers/staging/rtl8712/rtl8712_xmit.c
+++ b/drivers/staging/rtl8712/rtl8712_xmit.c
@@ -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
[toc] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-02-08 02:00 +0100 |
| Message-ID | <t8oM2-1D5-9@gated-at.bofh.it> |
| In reply to | #1576195 |
On Wed, Feb 08, 2017 at 12:47:22AM +0000, Carlos Palminha wrote: > 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
[toc] | [prev] | [next] | [standalone]
| From | Carlos Palminha <CARLOS.PALMINHA@synopsys.com> |
|---|---|
| Date | 2017-02-08 02:20 +0100 |
| Message-ID | <t8p5n-1Ze-11@gated-at.bofh.it> |
| In reply to | #1576203 |
On 08-02-2017 00:58, Dan Carpenter wrote: > On Wed, Feb 08, 2017 at 12:47:22AM +0000, Carlos Palminha wrote: >> 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 > true... i was short on words. will resend v2 with better description. Regards, C.Palminha
[toc] | [prev] | [next] | [standalone]
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2017-02-08 07:20 +0100 |
| Message-ID | <t8tLI-568-3@gated-at.bofh.it> |
| In reply to | #1576208 |
On Wed, Feb 08, 2017 at 01:19:39AM +0000, Carlos Palminha wrote: > > > On 08-02-2017 00:58, Dan Carpenter wrote: > >On Wed, Feb 08, 2017 at 12:47:22AM +0000, Carlos Palminha wrote: > >>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 > > > true... 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web