Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1226827ybh; Sat, 14 Mar 2020 21:34:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsunTZRxdFgJ2MZAOvmAO0eKfiXYRK5Wi+CIh3dQA2k1jmULkzVl4kl030S/UK2K/4bFP0j X-Received: by 2002:aca:d11:: with SMTP id 17mr5700400oin.128.1584246897782; Sat, 14 Mar 2020 21:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584246897; cv=none; d=google.com; s=arc-20160816; b=rTCWbhibB9EnFcg0bb2LTOa/lcmzNE9fCa674x9HXbzx2PcvqjkU5chzN2nFCWZLdJ dnLREtHUZmqGT1MWNZCsnEW0FD0BkDEGvRhPrWY1In3dITSzc0ZngwKxFORCvYMdqJGF CBpf+lJEwgyK/fY4NAtW91bVUJaSgM2OOf4qPrdM7dArfh/zXm4rEmeZvbWVKWNi3KGD CTxg/luBtlEIDstDEAqtQ5F15IDolBmPqogbqVCBpvE3cRhrlKCBVP8Fmd/O2SQ+NLVp 1/8pDad4XYm3c6IPB3tY9tOWTVw2A9xaeVW3lYrwVECk1Ww0WX0cFIfTxuIMakuYzLbH gbtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=Dg9RSZORA9LumKK5blIgM7GnML0+rluw8TXb1FlsNQg=; b=HTY/Dnd/+me12w6FOSdmm7NIUSSr7IMrVEVPHwkcTfcw6u/Bqdxf12Lz5y+nvAEc7Y 4MtIlu0SXuQAYDmVW1PgMtimlBi9qU6nKZYRjapWtn1/fZu2hH4HEBr60kkfZPIteZsp N22zLGix1TSMYtmp7hfqv5GrSGtahlHBctI/KznPQwkZ/cjDPoM8fis5Oa3D6MucNOMZ MIU5l760DJVKgQSlRRni7UpgLugG5ZvQjQZdZ8sF2T+zfdSLflsF3mT2uKV1Bg22sRK3 VhNAZy8cwrjZRXlBkitLMofnfGVFotAZT8R803AcDc43L2a9R5O5ZgB1867dWeyKMFfk 2M9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x2si563411oix.42.2020.03.14.21.34.42; Sat, 14 Mar 2020 21:34:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726417AbgCOEeR (ORCPT + 99 others); Sun, 15 Mar 2020 00:34:17 -0400 Received: from smtprelay0212.hostedemail.com ([216.40.44.212]:33592 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726136AbgCOEeR (ORCPT ); Sun, 15 Mar 2020 00:34:17 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id 8B2AC837F24C; Sun, 15 Mar 2020 04:34:16 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:968:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3872:4321:5007:10004:10400:10848:11232:11658:11914:12048:12297:12740:12760:12895:13069:13255:13311:13357:13439:13972:14096:14097:14659:14721:21080:21627:21990:30054:30056:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: blood54_7c668a58d7328 X-Filterd-Recvd-Size: 1907 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA; Sun, 15 Mar 2020 04:34:14 +0000 (UTC) Message-ID: <1c31f0e1a0fe8ee268f27289f6f820c7e48596d5.camel@perches.com> Subject: Re: [Outreachy kernel] [PATCH v2] Staging: rtl8723bs: rtw_mlme: Remove unnecessary conditions From: Joe Perches To: Shreeya Patel , gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com, sbrivio@redhat.com, daniel.baluta@gmail.com, nramas@linux.microsoft.com, hverkuil@xs4all.nl, Larry.Finger@lwfinger.net Date: Sat, 14 Mar 2020 21:32:29 -0700 In-Reply-To: <4deeaef8f8e0f23a9adbfd7d98840624e2994cf2.camel@gmail.com> References: <20200313102912.17218-1-shreeya.patel23498@gmail.com> <25a1aca2c993ecb70ba7cd9c9e38bce9170a98b0.camel@perches.com> <4deeaef8f8e0f23a9adbfd7d98840624e2994cf2.camel@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.34.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2020-03-14 at 16:58 +0530, Shreeya Patel wrote: > This could be: > > if ((!(phtpriv->ampdu_enable) && pregistrypriv->ampdu_enable == > > 1)) || > > pregistrypriv->ampdu_enable == 2) > > phtpriv->ampdu_enable = true; > > > > Though it is probably more sensible to just set > > phtpriv->ampdu_enable without testing whether or > > not it's already set: > > > > if (pregistrypriv->ampdu_enable == 1 || > > pregistrypriv->ampdu_enable == 2) > > phtpriv->ampdu_enable = true; > > But the else-if block which I removed in v2 of this patch had nothing > in the block. > It was not assigning any value to "phtpriv->ampdu_enable". ( basically > it was empty and useless) Right, I misread the deletions from patch.