Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5524729iog; Wed, 22 Jun 2022 23:08:18 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tbABV4b0SPsVv14iN3ctzYHDrXTUVYVDAP+VWgA2StWFMCZI7WgCTKjM8L5RlDarz850qW X-Received: by 2002:aa7:d6c9:0:b0:435:6698:589a with SMTP id x9-20020aa7d6c9000000b004356698589amr8694285edr.59.1655964498258; Wed, 22 Jun 2022 23:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655964498; cv=none; d=google.com; s=arc-20160816; b=zFTg03gIM9G6VLGUWrqrKGW8n/sN13ZmKyQ+hBrXIHTq1vh2tagpn7cjd9ATQIfXmL FoIvceiqQ+6coajoZPs3K0dG69yLOfGQbeLpaRWIkzfQPwj7T0RYhuuH169dhB/EuUOZ 6yFCgbdTF4/4bbBrV0IaDi07CeL6BIkrSFF4cp+V36lMkWpwt84I2vMBTVVwKeU/kf+M U9zt18mIdkgVn7C67kFuHlzuYNhzkeELKEmbA/hi9bW++Bftmr7kmkh8pEtSHGIDexFh yncxGP+muZe5uWnaVQq1TYzpFE/lFmd9GAgh4ihjXhWjDfzAc734o82Uu5u1JMeWIbtp shsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=kcwJ6iz0WSRqkk4otNBkZUgi8EG0jqf80hBxBcLJjoI=; b=VY8pE+Q46jAqEiMjNbe4E6CxLU04oiL68RPkmz88pglvTLMfHfTQlC5b3oPoE4300h iZ4O6iDWHdp6YKJmHsVLKcbdQ0okCirMaL9ICd03CiE1j1z35l6HpJsziRHDXUaZoJEv 7RDcXHezvHMiQQ6Oeo7VNFnZtNOYWBTqXFskzce6zWuF0jjtmiduONTpq0HoiexM6BXG K+QAs/ROEW0r9cy4CAZ71aW4YLU3yls1M5elhc4IsoSzuPaEw7hBwY5qg0u/j9v2sikv PiXAgKTjWL97ywpOQ+OCXKzDu8umu7Y2s2qW/oU+LgRffNOKPsm4iGZOSjdVrduOKvWs PeCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fw1jQ2id; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a05640211c900b00435ae0f76bfsi5688905edw.327.2022.06.22.23.07.53; Wed, 22 Jun 2022 23:08:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fw1jQ2id; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229639AbiFWFx1 (ORCPT + 99 others); Thu, 23 Jun 2022 01:53:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbiFWFx0 (ORCPT ); Thu, 23 Jun 2022 01:53:26 -0400 Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3049F3E5D4 for ; Wed, 22 Jun 2022 22:53:25 -0700 (PDT) Received: by mail-ed1-x534.google.com with SMTP id c65so3914952edf.4 for ; Wed, 22 Jun 2022 22:53:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=kcwJ6iz0WSRqkk4otNBkZUgi8EG0jqf80hBxBcLJjoI=; b=fw1jQ2idkZYe6jKTepYjZZxhD5giE5xmrVbaEL98EFHaGhs4KpxpLZgXV2E+ZzgVeE oMMh+qhpElWo0b5AGkujeZNW/sJx3VlXvuAowr+oxIq4cV1DfMKSr74Yhjhd5Tx2Zhqh uh2/CSeRAyVHmBcX0HZR3VHrdsyiaAKqPjCbJwnmWW1aeam455jrHGHKwZSaQbkgPYt1 VoSy90kfmNFRVeLRDKB7NmN/6G9taLBkyCb28b0IRgfe8pRR7Y4AXn1e887kVoRJ9DAQ ainC/Q4GSwL56yLXeKNcZDrMdHyFWEi1GnSUUCyq8+Bst+wlT8I4Gf7kmRcWlWSLX5AL 8aLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=kcwJ6iz0WSRqkk4otNBkZUgi8EG0jqf80hBxBcLJjoI=; b=UWDcQ58ePI1Yq33VnmObVo94z/K2oD6ULavKjBlS5uWLus9nft4OUbuQBAbVVsqAWw otomIlLmnVj8qaV99R/qipAn0wLulmNNomNuqnkHnsi/4SNGv2SL1s85UKumhv6tMJvu jybsGXBmZzGPlBnIedefJh37GsfbRkwLGTPRoAN/Me5EvvMGEoXsNW7lSd35F20RMCtw Armn/mrDH5XsXuS5tyaRsYv3NOY28DdioHQ2xyehh+S25DKHmXgS/me19ARy7M8k064T E1Xa1knciSF2YQMtUQkxwXlE2E9FdDVrCFxxzm0rmAYXPd2r38aW8fMkX19OmRDo62EI akEw== X-Gm-Message-State: AJIora+jAqgi+TtNRy1oandiz9XRscNjJf+P62kgj0oOE6cunlpsrQy7 /dePSUlXuuvQl4EqyqnG8LTR53UthAQ= X-Received: by 2002:a05:6402:274a:b0:435:9807:7752 with SMTP id z10-20020a056402274a00b0043598077752mr8606211edd.63.1655963603696; Wed, 22 Jun 2022 22:53:23 -0700 (PDT) Received: from [192.168.1.100] (p54a07b82.dip0.t-ipconnect.de. [84.160.123.130]) by smtp.gmail.com with ESMTPSA id 10-20020a170906318a00b00711aed17047sm10162207ejy.28.2022.06.22.22.53.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Jun 2022 22:53:23 -0700 (PDT) Message-ID: <02cc4538-73c4-9f0f-45d9-29f867143df7@gmail.com> Date: Thu, 23 Jun 2022 07:53:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v2] staging: r8188eu: combine nested if statements into one Content-Language: en-US To: Chang Yu , Larry.Finger@lwfinger.net, phil@philpotter.co.uk Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org References: <20220623051404.410632-1-marcus.yu.56@gmail.com> From: Philipp Hortmann In-Reply-To: <20220623051404.410632-1-marcus.yu.56@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/23/22 07:14, Chang Yu wrote: > Combine two nested if statements into a single one > > Signed-off-by: Chang Yu > --- > 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 # Edimax N150