mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
staging: rtl8723bs: remove unnecessary parentheses
Remove unnecessary parentheses around variables and struct members in rtw_sta_mgt.c to comply with the Linux kernel coding style. This issue was reported by checkpatch.pl. Signed-off-by: Yan Pan <maxwell2119@163.com> Link: https://patch.msgid.link/20260222072632.2931217-1-maxwell2119@163.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
0c9d1b56f9
commit
282a976a0f
|
|
@ -79,7 +79,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
|||
for (i = 0; i < NUM_STA; i++) {
|
||||
_rtw_init_stainfo(psta);
|
||||
|
||||
INIT_LIST_HEAD(&(pstapriv->sta_hash[i]));
|
||||
INIT_LIST_HEAD(&pstapriv->sta_hash[i]);
|
||||
|
||||
list_add_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue));
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
|||
/*delete all reordering_ctrl_timer */
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
for (index = 0; index < NUM_STA; index++) {
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
phead = &pstapriv->sta_hash[index];
|
||||
list_for_each(plist, phead) {
|
||||
int i;
|
||||
|
||||
|
|
@ -186,15 +186,15 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
pfree_sta_queue = &pstapriv->free_sta_queue;
|
||||
|
||||
/* spin_lock_bh(&(pfree_sta_queue->lock)); */
|
||||
spin_lock_bh(&(pstapriv->sta_hash_lock));
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
if (list_empty(&pfree_sta_queue->queue)) {
|
||||
/* spin_unlock_bh(&(pfree_sta_queue->lock)); */
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
return NULL;
|
||||
}
|
||||
psta = container_of(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||
|
||||
list_del_init(&(psta->list));
|
||||
list_del_init(&psta->list);
|
||||
|
||||
/* spin_unlock_bh(&(pfree_sta_queue->lock)); */
|
||||
|
||||
|
|
@ -207,11 +207,11 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
index = wifi_mac_hash(hwaddr);
|
||||
|
||||
if (index >= NUM_STA) {
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
psta = NULL;
|
||||
goto exit;
|
||||
}
|
||||
phash_list = &(pstapriv->sta_hash[index]);
|
||||
phash_list = &pstapriv->sta_hash[index];
|
||||
|
||||
/* spin_lock_bh(&(pstapriv->sta_hash_lock)); */
|
||||
|
||||
|
|
@ -258,7 +258,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
/* init for the sequence number of received management frame */
|
||||
psta->RxMgmtFrameSeqNum = 0xffff;
|
||||
spin_unlock_bh(&(pstapriv->sta_hash_lock));
|
||||
spin_unlock_bh(&pstapriv->sta_hash_lock);
|
||||
/* alloc mac id for non-bc/mc station, */
|
||||
rtw_alloc_macid(pstapriv->padapter, psta);
|
||||
|
||||
|
|
@ -300,7 +300,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
|
|||
/* vo */
|
||||
/* spin_lock_bh(&(pxmitpriv->vo_pending.lock)); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
|
||||
list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
|
||||
list_del_init(&pstaxmitpriv->vo_q.tx_pending);
|
||||
phwxmit = pxmitpriv->hwxmits;
|
||||
phwxmit->accnt -= pstaxmitpriv->vo_q.qcnt;
|
||||
pstaxmitpriv->vo_q.qcnt = 0;
|
||||
|
|
@ -309,7 +309,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
|
|||
/* vi */
|
||||
/* spin_lock_bh(&(pxmitpriv->vi_pending.lock)); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
|
||||
list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
|
||||
list_del_init(&pstaxmitpriv->vi_q.tx_pending);
|
||||
phwxmit = pxmitpriv->hwxmits + 1;
|
||||
phwxmit->accnt -= pstaxmitpriv->vi_q.qcnt;
|
||||
pstaxmitpriv->vi_q.qcnt = 0;
|
||||
|
|
@ -318,7 +318,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
|
|||
/* be */
|
||||
/* spin_lock_bh(&(pxmitpriv->be_pending.lock)); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
|
||||
list_del_init(&(pstaxmitpriv->be_q.tx_pending));
|
||||
list_del_init(&pstaxmitpriv->be_q.tx_pending);
|
||||
phwxmit = pxmitpriv->hwxmits + 2;
|
||||
phwxmit->accnt -= pstaxmitpriv->be_q.qcnt;
|
||||
pstaxmitpriv->be_q.qcnt = 0;
|
||||
|
|
@ -327,7 +327,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
|
|||
/* bk */
|
||||
/* spin_lock_bh(&(pxmitpriv->bk_pending.lock)); */
|
||||
rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
|
||||
list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
|
||||
list_del_init(&pstaxmitpriv->bk_q.tx_pending);
|
||||
phwxmit = pxmitpriv->hwxmits + 3;
|
||||
phwxmit->accnt -= pstaxmitpriv->bk_q.qcnt;
|
||||
pstaxmitpriv->bk_q.qcnt = 0;
|
||||
|
|
@ -369,7 +369,7 @@ u32 rtw_free_stainfo(struct adapter *padapter, struct sta_info *psta)
|
|||
|
||||
plist = get_next(plist);
|
||||
|
||||
list_del_init(&(prframe->u.hdr.list));
|
||||
list_del_init(&prframe->u.hdr.list);
|
||||
|
||||
rtw_free_recvframe(prframe, pfree_recv_queue);
|
||||
}
|
||||
|
|
@ -435,7 +435,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)
|
|||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
for (index = 0; index < NUM_STA; index++) {
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
phead = &pstapriv->sta_hash[index];
|
||||
list_for_each_safe(plist, tmp, phead) {
|
||||
psta = list_entry(plist, struct sta_info, hash_list);
|
||||
|
||||
|
|
@ -473,7 +473,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|||
|
||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||
|
||||
phead = &(pstapriv->sta_hash[index]);
|
||||
phead = &pstapriv->sta_hash[index];
|
||||
list_for_each(plist, phead) {
|
||||
psta = list_entry(plist, struct sta_info, hash_list);
|
||||
|
||||
|
|
@ -525,7 +525,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
|||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||
struct __queue *pacl_node_q = &pacl_list->acl_node_q;
|
||||
|
||||
spin_lock_bh(&(pacl_node_q->lock));
|
||||
spin_lock_bh(&pacl_node_q->lock);
|
||||
phead = get_list_head(pacl_node_q);
|
||||
list_for_each(plist, phead) {
|
||||
paclnode = list_entry(plist, struct rtw_wlan_acl_node, list);
|
||||
|
|
@ -536,7 +536,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
|||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_bh(&(pacl_node_q->lock));
|
||||
spin_unlock_bh(&pacl_node_q->lock);
|
||||
|
||||
if (pacl_list->mode == 1) /* accept unless in deny list */
|
||||
res = !match;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user