staging: rtl8723bs: remove unnecessary else after break/return
PATCH 1/1 staging: rtl8723bs: remove unnecessary else after break/return
checkpatch.pl flags an else clause following a branch that already returns, in enqueue_reorder_recvframe(). Restructure the if/else-if/else chain into sequential checks to remove the redundant else, with no change in behavior.
Signed-off-by ColtenOuO <[email protected]>
--- drivers/staging/rtl8723bs/core/rtw_recv.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/staging/rtl8723bs/core/rtw_recv.c +3 -5
@@ -1783,14 +1783,12 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, un pnextrframe = (union recv_frame *)plist; pnextattrib = &pnextrframe->u.hdr.attrib; -if (SN_LESS (pnextattrib->seq_num, pattrib->seq_num)) - plist =get_next (plist); -else if (SN_EQUAL (pnextattrib->seq_num, pattrib->seq_num)) +if (SN_EQUAL (pnextattrib->seq_num, pattrib->seq_num))/* Duplicate entry is found!! Do not insert current entry. */ -/* spin_unlock_irqrestore(&ppending_recvframe_queue->lock, irql); */ return false; -else +if (!SN_LESS (pnextattrib->seq_num, pattrib->seq_num))break ; + plist =get_next (plist); }/* spin_lock_irqsave(&ppending_recvframe_queue->lock, irql); */
Signature · 1 line
2.43.0
Quoted 6 lines · ColtenOuO
checkpatch.pl flags an else clause following a branch that already returns, in
enqueue_reorder_recvframe(). Restructure the if/else-if/else chain into sequential checks to remove the redundant else, with no change in behavior.Signed-off-by ColtenOuO <[email protected]>
That's not the name you use to sign legal documents.
But really, the original code is fine, just ignore tools when they are wrong.
regards,
dan carpenter