Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp773708ybh; Wed, 11 Mar 2020 10:30:29 -0700 (PDT) X-Google-Smtp-Source: ADFU+vspojA4iLOtyewK2e/C9SOFYAZWw0U7FO2I2pWpgTnWv9+PwdRoftCNAy7gixxTmUPzcg+u X-Received: by 2002:a9d:404b:: with SMTP id o11mr3057326oti.368.1583947829166; Wed, 11 Mar 2020 10:30:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583947829; cv=none; d=google.com; s=arc-20160816; b=Dge3rPK+NB/kWjz4o+CsdW1JA4YsflT8p1Vdzufaixn4or//EbJy9y/GDopzUAUwUP 6lsVeww5km65ROF0T+EsaVt09lVsi6Wjjg7W2hC8SjsKbPCq+CmAudGR0TnVsThp2QYn mRaE6mJSjZP7TNYj8KjZIT7mM+n2Xy7B9AnZTAoWTj0gmONdjmNg3/WTREiwg+vnKZbI 75YnVtkax7NSBzd9IFQYNXpSVPJhDff6WsuI37U1+NArvVrKcPKzHAJ4ABgMoQV5IgPN rq9jXCyF6t5BJ/eHJh8S38W6dP6PBapS0uro3SCuuhpDJekiv184DV2a8nIHAOhUxavT VluQ== 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=Pfd0Pr80B+86E/FvfeslKbt/J9U185IrLlfCXJ5A7XQ=; b=g+4rNHLDr8iovsktu9Xe06PG47uRHWAsNgSJWvJxmN2+GF301w3itGYC8u6I1A5xz7 a23gSmdeE2e8Gtz6urRjuUasRV5Mbbrnl0f0Xxm8cQL6jT6fThH6x341C7B07DPWnnb8 e9GneOl0DDA7UBB1dXx7JKeeXvv0dB7n8I7a3vkc6hx4TD1sjCWRQL0QdER0pUmvCMci 6zRKdGcWSjaC4yrfSeAORBvi34RoI56jjoFZhc740KxYyYYmouS/ayC1SFGyT6vKDdul h4MXXPZ6SJW6ixPg2SLS2/X0lC/FFmsae8LBp7LZ4y3SWsiIdwicSIgbtfwbBWNUncqs IDEg== 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 26si1433340oiz.107.2020.03.11.10.30.16; Wed, 11 Mar 2020 10:30:29 -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 S1730573AbgCKR2P (ORCPT + 99 others); Wed, 11 Mar 2020 13:28:15 -0400 Received: from smtprelay0124.hostedemail.com ([216.40.44.124]:42678 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730363AbgCKR2P (ORCPT ); Wed, 11 Mar 2020 13:28:15 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id 447CF182CED2A; Wed, 11 Mar 2020 17:28:14 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,,RULES_HIT:41:355:379:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1381:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3871:3872:3873:4225:4321:5007:7903:7904:8957:10004:10400:11232:11473:11657:11658:11914:12043:12048:12297:12555:12740:12760:12895:12986:13069:13255:13311:13357:13439:13972:14093:14096:14097:14659:14721:21080:21627:21990:30054: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: bird04_64cb9a8d21023 X-Filterd-Recvd-Size: 2329 Received: from XPS-9350.home (unknown [47.151.143.254]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Wed, 11 Mar 2020 17:28:12 +0000 (UTC) Message-ID: <0fed25f914c6f39b024dd3bbc4f11892c40f4a60.camel@perches.com> Subject: Re: [Outreachy kernel] [PATCH] Staging: rtl8723bs: sdio_halinit: 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: Wed, 11 Mar 2020 10:26:29 -0700 In-Reply-To: <20200311133811.2246-1-shreeya.patel23498@gmail.com> References: <20200311133811.2246-1-shreeya.patel23498@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 Wed, 2020-03-11 at 19:08 +0530, Shreeya Patel wrote: > Remove if and else conditions since both are leading to the > initialization of "valueDMATimeout" and "valueDMAPageCount" with > the same value. You might consider removing the /* Timeout value is calculated by 34 / (2^n) */ comment entirely as it doesn't make much sense. For what N is "(34 / (2 ^ N))" = 6 ? > diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c [] > @@ -551,18 +551,11 @@ static void HalRxAggr8723BSdio(struct adapter *padapter) > > pregistrypriv = &padapter->registrypriv; > > - if (pregistrypriv->wifi_spec) { > - /* 2010.04.27 hpfan */ > - /* Adjust RxAggrTimeout to close to zero disable RxAggr, suggested by designer */ > - /* Timeout value is calculated by 34 / (2^n) */ > - valueDMATimeout = 0x06; > - valueDMAPageCount = 0x06; > - } else { > - /* 20130530, Isaac@SD1 suggest 3 kinds of parameter */ > - /* TX/RX Balance */ > - valueDMATimeout = 0x06; > - valueDMAPageCount = 0x06; > - } > + /* 2010.04.27 hpfan */ > + /* Adjust RxAggrTimeout to close to zero disable RxAggr, suggested by designer */ > + /* Timeout value is calculated by 34 / (2^n) */ > + valueDMATimeout = 0x06; > + valueDMAPageCount = 0x06;