diff options
author | Luis de Bethencourt | 2015-10-19 19:16:01 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2015-10-25 03:26:59 +0100 |
commit | 4ef2de5ae0377bc88c1f5021c3797db3c62bc384 (patch) | |
tree | f75e93acc4bcc370b0b899ea362f7e347a3d4b4a /drivers/staging/rtl8712/rtl8712_xmit.c | |
parent | staging: rtl8712: braces should be used on all arms (diff) | |
download | kernel-qcow2-linux-4ef2de5ae0377bc88c1f5021c3797db3c62bc384.tar.gz kernel-qcow2-linux-4ef2de5ae0377bc88c1f5021c3797db3c62bc384.tar.xz kernel-qcow2-linux-4ef2de5ae0377bc88c1f5021c3797db3c62bc384.zip |
staging: rtl8712: spaces preferred around operands
Clean up all instances of checkpatch.pl checks:
CHECK: spaces preferred around that '+'
(and other operands)
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl8712_xmit.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl8712_xmit.c | 60 |
1 files changed, 33 insertions, 27 deletions
diff --git a/drivers/staging/rtl8712/rtl8712_xmit.c b/drivers/staging/rtl8712/rtl8712_xmit.c index 02140b0ebf7f..b21a60e9f8a9 100644 --- a/drivers/staging/rtl8712/rtl8712_xmit.c +++ b/drivers/staging/rtl8712/rtl8712_xmit.c @@ -264,13 +264,14 @@ u8 r8712_construct_txaggr_cmd_desc(struct xmit_buf *pxmitbuf) /* Fill up TxCmd Descriptor according as USB FW Tx Aaggregation info.*/ /* dw0 */ - ptx_desc->txdw0 = cpu_to_le32(CMD_HDR_SZ&0xffff); + ptx_desc->txdw0 = cpu_to_le32(CMD_HDR_SZ & 0xffff); ptx_desc->txdw0 |= - cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ)<<OFFSET_SHT)&0x00ff0000); + cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & + 0x00ff0000); ptx_desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); /* dw1 */ - ptx_desc->txdw1 |= cpu_to_le32((0x13<<QSEL_SHT)&0x00001f00); + ptx_desc->txdw1 |= cpu_to_le32((0x13 << QSEL_SHT) & 0x00001f00); return _SUCCESS; } @@ -322,12 +323,14 @@ u8 r8712_append_mpdu_unit(struct xmit_buf *pxmitbuf, int i; for (i = 0; i < padding_sz; i++) - *(pxmitframe->buf_addr+TXDESC_SIZE+last_txcmdsz+i) = 0; + *(pxmitframe->buf_addr + TXDESC_SIZE + last_txcmdsz + + i) = 0; } /* Add the new mpdu's length */ - ptx_desc->txdw0 = cpu_to_le32((ptx_desc->txdw0&0xffff0000) | - ((ptx_desc->txdw0&0x0000ffff)+ - ((TXDESC_SIZE+last_txcmdsz+padding_sz)&0x0000ffff))); + ptx_desc->txdw0 = cpu_to_le32((ptx_desc->txdw0 & 0xffff0000) | + ((ptx_desc->txdw0 & 0x0000ffff) + + ((TXDESC_SIZE + last_txcmdsz + padding_sz) & + 0x0000ffff))); return _SUCCESS; } @@ -341,7 +344,7 @@ u8 r8712_xmitframe_aggr_1st(struct xmit_buf *pxmitbuf, pxmitbuf->priv_data = pxmitframe; pxmitframe->pxmit_urb[0] = pxmitbuf->pxmit_urb[0]; /* buffer addr assoc */ - pxmitframe->buf_addr = pxmitbuf->pbuf+TXDESC_SIZE+CMD_HDR_SZ; + pxmitframe->buf_addr = pxmitbuf->pbuf + TXDESC_SIZE + CMD_HDR_SZ; /*RTL8712_DMA_H2CCMD */ r8712_construct_txaggr_cmd_desc(pxmitbuf); r8712_construct_txaggr_cmd_hdr(pxmitbuf); @@ -382,29 +385,32 @@ u8 r8712_dump_aggr_xframe(struct xmit_buf *pxmitbuf, /* use 1st xmitframe as media */ xmitframe_xmitbuf_attach(pxmitframe, pxmitbuf); - pcmd_hdr->cmd_dw0 = cpu_to_le32(((total_length-CMD_HDR_SZ)&0x0000ffff)| - (pcmd_hdr->cmd_dw0&0xffff0000)); + pcmd_hdr->cmd_dw0 = cpu_to_le32(((total_length - CMD_HDR_SZ) & + 0x0000ffff) | (pcmd_hdr->cmd_dw0 & + 0xffff0000)); /* urb length in cmd_dw1 */ pcmd_hdr->cmd_dw1 = cpu_to_le32((pxmitbuf->aggr_nr & 0xff)| - ((total_length+TXDESC_SIZE) << 16)); + ((total_length + TXDESC_SIZE) << 16)); pxmitframe->last[0] = 1; pxmitframe->bpending[0] = false; pxmitframe->mem_addr = pxmitbuf->pbuf; - if ((pdvobj->ishighspeed && ((total_length+TXDESC_SIZE)%0x200) == 0) || - ((!pdvobj->ishighspeed && - ((total_length+TXDESC_SIZE)%0x40) == 0))) { + if ((pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % 0x200) == + 0) || ((!pdvobj->ishighspeed && ((total_length + TXDESC_SIZE) % + 0x40) == 0))) { ptxdesc->txdw0 |= cpu_to_le32 - (((TXDESC_SIZE+OFFSET_SZ+8)<<OFFSET_SHT)&0x00ff0000); + (((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) & + 0x00ff0000); /*32 bytes for TX Desc + 8 bytes pending*/ } else { ptxdesc->txdw0 |= cpu_to_le32 - (((TXDESC_SIZE+OFFSET_SZ)<<OFFSET_SHT)&0x00ff0000); + (((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & + 0x00ff0000); /*default = 32 bytes for TX Desc*/ } r8712_write_port(pxmitframe->padapter, RTL8712_DMA_H2CCMD, - total_length+TXDESC_SIZE, (u8 *)pxmitframe); + total_length + TXDESC_SIZE, (u8 *)pxmitframe); return _SUCCESS; } @@ -432,7 +438,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) memcpy(&txdesc_mp, ptxdesc, sizeof(struct tx_desc)); memset(ptxdesc, 0, sizeof(struct tx_desc)); /* offset 0 */ - ptxdesc->txdw0 |= cpu_to_le32(sz&0x0000ffff); + ptxdesc->txdw0 |= cpu_to_le32(sz & 0x0000ffff); if (pdvobj->ishighspeed) { if (((sz + TXDESC_SIZE) % 512) == 0) blnSetTxDescOffset = 1; @@ -446,42 +452,42 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) } if (blnSetTxDescOffset) { /* 32 bytes for TX Desc + 8 bytes pending */ - ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ + 8) << + ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ + 8) << OFFSET_SHT) & 0x00ff0000); } else { /* default = 32 bytes for TX Desc */ - ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE+OFFSET_SZ) << + ptxdesc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00ff0000); } ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); if (pxmitframe->frame_tag == DATA_FRAMETAG) { /* offset 4 */ - ptxdesc->txdw1 |= cpu_to_le32((pattrib->mac_id)&0x1f); + ptxdesc->txdw1 |= cpu_to_le32((pattrib->mac_id) & 0x1f); #ifdef CONFIG_R8712_TX_AGGR /* dirty workaround, need to check if it is aggr cmd. */ if ((u8 *)pmem != (u8 *)pxmitframe->pxmitbuf->pbuf) { ptxdesc->txdw0 |= cpu_to_le32 - ((0x3 << TYPE_SHT)&TYPE_MSK); + ((0x3 << TYPE_SHT) & TYPE_MSK); qsel = (uint)(pattrib->qsel & 0x0000001f); if (qsel == 2) qsel = 0; ptxdesc->txdw1 |= cpu_to_le32 ((qsel << QSEL_SHT) & 0x00001f00); ptxdesc->txdw2 = cpu_to_le32 - ((qsel << RTS_RC_SHT)&0x001f0000); + ((qsel << RTS_RC_SHT) & 0x001f0000); ptxdesc->txdw6 |= cpu_to_le32 - ((0x5 << RSVD6_SHT)&RSVD6_MSK); + ((0x5 << RSVD6_SHT) & RSVD6_MSK); } else { ptxdesc->txdw0 |= cpu_to_le32 - ((0x3 << TYPE_SHT)&TYPE_MSK); + ((0x3 << TYPE_SHT) & TYPE_MSK); ptxdesc->txdw1 |= cpu_to_le32 ((0x13 << QSEL_SHT) & 0x00001f00); qsel = (uint)(pattrib->qsel & 0x0000001f); if (qsel == 2) qsel = 0; ptxdesc->txdw2 = cpu_to_le32 - ((qsel << RTS_RC_SHT)&0x0001f000); + ((qsel << RTS_RC_SHT) & 0x0001f000); ptxdesc->txdw7 |= cpu_to_le32 (pcmdpriv->cmd_seq << 24); pcmdpriv->cmd_seq++; @@ -593,7 +599,7 @@ static void update_txdesc(struct xmit_frame *pxmitframe, uint *pmem, int sz) ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00); } else { /* offset 4 */ - qsel = (uint)(pattrib->priority&0x0000001f); + qsel = (uint)(pattrib->priority & 0x0000001f); ptxdesc->txdw1 |= cpu_to_le32((qsel << QSEL_SHT) & 0x00001f00); /*offset 8*/ /*offset 12*/ |