Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1576297ybh; Fri, 13 Mar 2020 03:47:52 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsNXHPJAYS2N7XhprGLuoiKRqIg8M8ELoLAO+oI7eqkKAYJBXyl8uhWMjQEqNHR5x50PaKq X-Received: by 2002:a9d:3e89:: with SMTP id b9mr10593427otc.3.1584096472111; Fri, 13 Mar 2020 03:47:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584096472; cv=none; d=google.com; s=arc-20160816; b=kVQfiAyBkh7mK+WakFHgbUjb6MhUnnB0vvTmyak113IqOyfkDNSQ2ykYtHrmmXcUWg JxdkG4OG17bojO7XXnADP1YFJkQS2hNaIrGvUuWgwcnN/9HhsuL6J041yfEbsp8m3rjF ShAszx3dK5HzOECIOVHN5AD8moNjmwpeM3TU1XFdB3p454i9x0V2nP4apyljz/mgRhcs kwkFu9pQsZOXoX0mLZWw1Sm2hE0rXtsZl/bVWG/YgzNdns372In0kLrc7uJ6UqWEimkM 4ECVdytsJHwCP1aaP81pRbdAAjQbKb0QFnLRo2T1pN38VjVsrUVOeyxLLF/mlU5jryO3 +qxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=o6afTbf7/yCeF+VeaZhhomT+KkYIZitsMbrfbHYx5jo=; b=HzGPWReEedHrB1yt4AshtqVgNJyIjRMHncF3OuiiiTDGPi+HNvMm2VEfd/Vr4HA5dx ro9Dw3ZfTMmSxmIwJciuFq5/sSEQCmV5TssYTuvRtPip+zNJ70FV4DQJUg961F1r71tx nJcakCU6Wx9Xl1Xvoe/tPGKOPMCMLaMeSrhArGcZbddQw8PdDGOu8PRQm+Nm73AJmgmr 3ZHJNysjbfXock4Ws1duIojketfLQT6uo5VsJM24gyGniQct/xgJ0y1zDrOJ+JL+AH3/ 6vS2a72nt23LlYBMx0BeYpYA5NZGFIJBI6Km0GtvUyPpU0gKCU41BrciPbUKnPJEkGWz nhxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="rB/JrxX0"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w31si4144112otb.59.2020.03.13.03.47.39; Fri, 13 Mar 2020 03:47:52 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="rB/JrxX0"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726488AbgCMKqv (ORCPT + 99 others); Fri, 13 Mar 2020 06:46:51 -0400 Received: from mail-pj1-f68.google.com ([209.85.216.68]:51386 "EHLO mail-pj1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbgCMKqv (ORCPT ); Fri, 13 Mar 2020 06:46:51 -0400 Received: by mail-pj1-f68.google.com with SMTP id hg10so17511pjb.1 for ; Fri, 13 Mar 2020 03:46:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=o6afTbf7/yCeF+VeaZhhomT+KkYIZitsMbrfbHYx5jo=; b=rB/JrxX0L7LaAtUV00dCdFiedhiTR681/8tixC3LeFg+mmm/oXg1UoXM5C8wHRbfnZ fhZ2bENDyBia9zKeDoain0e20+dVQldHc4w+6WHRXveP9NpqXpKJAfyXWEaUOHVWb9cF 0fYHTuY9ZYI6bh8h4rwiiaPGCV4lqZsKOoIPDisRmUTiQAlmo1fJdz/PHZ76ep+qDac2 hGGZ33A4d3LhU9ZGvvurTqRgkJsr3kZn7a+BHs6Cqyg2oQ0Jlt6V0QF3w4SdSPbU9NTZ /YPCNnoDIfm54kn3HrYFONeqKy8RbdGFDdtHcNRof1B9P+zh9H8ObS8EBDVKmlMWxGBC 0JCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=o6afTbf7/yCeF+VeaZhhomT+KkYIZitsMbrfbHYx5jo=; b=CPKa1h7CKGR6i7TOEeOpdv14rFYniAwfquXno/w4Fs+69WliknY/iO5rH7bJTJd29B IsRhCUg6/+e/efwEWUS8h7yb5VZ+smJtyHyB+EAsS3yCuGz6XC0gtQeNPeB49lJmVXt9 mgafWtTEPb+TVFDhk/mxW2EbPGWQVaJ1P2LXh8NFgDUUqAadN2+1Z+CPsFz2fCz6QlNG o1zTep+GWKPS09qNZQD9miosfOm5cF/MiRrcEnnGBAgixEpZXpHApxm4MJA2mTiMcBNY unyx99VMoM/iGJ7O7dIO0ivMbQ94jxHIKZUDj43MBXweL++iDtoe+FL/i0xGxzulHJMN RaWA== X-Gm-Message-State: ANhLgQ2QD9Vogc8TIRzJhrNdTdz8q8LxdDVX/g1sB9Ufg1Jg/QXx4QYU HxaUcC9xs/j/c3DStS6DRlo= X-Received: by 2002:a17:90a:2042:: with SMTP id n60mr1625659pjc.0.1584096410372; Fri, 13 Mar 2020 03:46:50 -0700 (PDT) Received: from localhost.localdomain ([2405:204:22f:d418:f8a5:7ca8:f99b:fa30]) by smtp.gmail.com with ESMTPSA id p70sm1709171pjp.47.2020.03.13.03.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 03:46:49 -0700 (PDT) From: Shreeya Patel To: regkh@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, shreeya.patel23498@gmail.com, Larry.Finger@lwfinger.net Subject: [Outreachy kernel] [PATCH v2] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions Date: Fri, 13 Mar 2020 16:16:40 +0530 Message-Id: <20200313104640.19787-1-shreeya.patel23498@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove if and else conditions since both are leading to the initialization of "valueDMATimeout" and "valueDMAPageCount" with the same value. Found using coccinelle script. Signed-off-by: Shreeya Patel --- Changes in v2 - Remove unnecessary comments. drivers/staging/rtl8723bs/hal/sdio_halinit.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index e813382e78a6..4894f7d9a1d4 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -551,18 +551,8 @@ 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; - } + valueDMATimeout = 0x06; + valueDMAPageCount = 0x06; rtw_write8(padapter, REG_RXDMA_AGG_PG_TH + 1, valueDMATimeout); rtw_write8(padapter, REG_RXDMA_AGG_PG_TH, valueDMAPageCount); -- 2.17.1