mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
staging: rtl8723bs: clean up conditionals
Move all closing braces and parentheses to the end of the line. Remove braces from 'if' statements with a single 'then' line. Move logical operators to the end of lines in multiline conditional. Remove unnecessary parentheses. Issues found with checkpatch.pl Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b32b2cacd9
commit
c4ac540793
1 changed files with 7 additions and 17 deletions
|
@ -64,9 +64,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
|
||||||
if (alloc_sz > 0) {
|
if (alloc_sz > 0) {
|
||||||
pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
|
pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
|
||||||
if (pxmitbuf->pallocated_buf == NULL)
|
if (pxmitbuf->pallocated_buf == NULL)
|
||||||
{
|
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
|
pxmitbuf->pbuf = (u8 *)N_BYTE_ALIGMENT((SIZE_PTR)(pxmitbuf->pallocated_buf), XMITBUF_ALIGN_SZ);
|
||||||
}
|
}
|
||||||
|
@ -91,9 +89,7 @@ void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt)
|
||||||
if (padapter->registrypriv.wifi_spec) {
|
if (padapter->registrypriv.wifi_spec) {
|
||||||
if (__netif_subqueue_stopped(padapter->pnetdev, queue) &&
|
if (__netif_subqueue_stopped(padapter->pnetdev, queue) &&
|
||||||
(pxmitpriv->hwxmits[queue].accnt < WMM_XMIT_THRESHOLD))
|
(pxmitpriv->hwxmits[queue].accnt < WMM_XMIT_THRESHOLD))
|
||||||
{
|
|
||||||
netif_wake_subqueue(padapter->pnetdev, queue);
|
netif_wake_subqueue(padapter->pnetdev, queue);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
if (__netif_subqueue_stopped(padapter->pnetdev, queue))
|
if (__netif_subqueue_stopped(padapter->pnetdev, queue))
|
||||||
netif_wake_subqueue(padapter->pnetdev, queue);
|
netif_wake_subqueue(padapter->pnetdev, queue);
|
||||||
|
@ -177,18 +173,15 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
|
||||||
|
|
||||||
for (i = 0; i < chk_alive_num; i++) {
|
for (i = 0; i < chk_alive_num; i++) {
|
||||||
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
|
psta = rtw_get_stainfo_by_offset(pstapriv, chk_alive_list[i]);
|
||||||
if (!(psta->state & _FW_LINKED))
|
if (!(psta->state & _FW_LINKED)) {
|
||||||
{
|
|
||||||
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_fw_linked);
|
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_fw_linked);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* avoid come from STA1 and send back STA1 */
|
/* avoid come from STA1 and send back STA1 */
|
||||||
if (!memcmp(psta->hwaddr, &skb->data[6], 6)
|
if (!memcmp(psta->hwaddr, &skb->data[6], 6) ||
|
||||||
|| !memcmp(psta->hwaddr, null_addr, 6)
|
!memcmp(psta->hwaddr, null_addr, 6) ||
|
||||||
|| !memcmp(psta->hwaddr, bc_addr, 6)
|
!memcmp(psta->hwaddr, bc_addr, 6)) {
|
||||||
)
|
|
||||||
{
|
|
||||||
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self);
|
DBG_COUNTER(padapter->tx_logs.os_tx_m2u_ignore_self);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -248,14 +241,11 @@ int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
||||||
|| is_broadcast_mac_addr(pkt->data)
|
|| is_broadcast_mac_addr(pkt->data)
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
&& (padapter->registrypriv.wifi_spec == 0)
|
&& padapter->registrypriv.wifi_spec == 0) {
|
||||||
)
|
|
||||||
{
|
|
||||||
if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME/4)) {
|
if (pxmitpriv->free_xmitframe_cnt > (NR_XMITFRAME/4)) {
|
||||||
res = rtw_mlcst2unicst(padapter, pkt);
|
res = rtw_mlcst2unicst(padapter, pkt);
|
||||||
if (res == true) {
|
if (res == true)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* DBG_871X("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */
|
/* DBG_871X("Stop M2U(%d, %d)! ", pxmitpriv->free_xmitframe_cnt, pxmitpriv->free_xmitbuf_cnt); */
|
||||||
/* DBG_871X("!m2u); */
|
/* DBG_871X("!m2u); */
|
||||||
|
|
Loading…
Reference in a new issue