lkml.org 
[lkml]   [2022]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] staging: r8188eu: combine nested if statements into one
From
On 6/23/22 07:14, Chang Yu wrote:
> Combine two nested if statements into a single one
>
> Signed-off-by: Chang Yu <marcus.yu.56@gmail.com>
> ---
> Changes in v2:
> Added a pair of parentheses to make operator precedence explicit.
>
> drivers/staging/r8188eu/core/rtw_recv.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c
> index 6564e82ddd66..020bc212532f 100644
> --- a/drivers/staging/r8188eu/core/rtw_recv.c
> +++ b/drivers/staging/r8188eu/core/rtw_recv.c
> @@ -166,10 +166,8 @@ int rtw_free_recvframe(struct recv_frame *precvframe, struct __queue *pfree_recv
>
> list_add_tail(&precvframe->list, get_list_head(pfree_recv_queue));
>
> - if (padapter) {
> - if (pfree_recv_queue == &precvpriv->free_recv_queue)
> - precvpriv->free_recvframe_cnt++;
> - }
> + if (padapter && (pfree_recv_queue == &precvpriv->free_recv_queue))
> + precvpriv->free_recvframe_cnt++;
>
> spin_unlock_bh(&pfree_recv_queue->lock);
>


Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150

\
 
 \ /
  Last update: 2022-06-23 07:54    [W:0.166 / U:3.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site