Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp569632ybh; Wed, 11 Mar 2020 06:39:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtN40vY7ru3BcbQXdC0458EzURskFmgoXpniwNN7yFGZ0ENpqpL66VQ4RqX88klE74qS/Cr X-Received: by 2002:a05:6808:614:: with SMTP id y20mr1905268oih.64.1583933950445; Wed, 11 Mar 2020 06:39:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583933950; cv=none; d=google.com; s=arc-20160816; b=Ai4fDwKxG73Ut2C+qiZuUy2yx0zDnPtV+dmE+Gqs6DqWwmPwJ7BR/VuHLXF+hqmhWM RJQlYP51iUG4034HxmHQzz/Fj1n8AIpbNjItv7muJ0fqnCqIb8dXTDvtcArp+QcPNGX/ DYCnNczf/VrA5iQZ6mOfu4KZ2ostdb/zr+thPRm48qdG6iSJ+KWM0S8Y/6hJsQ0l06BW 2J3X++jiNUATndRS3WnnXKWs7ReFwW+gKIVReXuGeCnuqpkZLxypzew3ZktMcMNJr+QB 94t43G8R/zJ+sTptysqNolYojwQ4EgutL8+FIHzCDmTsocZ0KCrfE57ui3bWSNBSlG/+ N5GQ== 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=iwO+qWgIM9f3My2kQh2h35ZK0GeUk2RHl41oBvJStTA=; b=rTwthvHhRx2nqr0fTtpoJcx6t8x62unP+fG5PbN9tKfXEgQcV8VZpbw/AQlibC7rY8 mkrH/KnLq5LQMHHrQKf+8Vj9ucc1p1ri0z3Suc5SbSqtiHsGJSJ4pHc4Gu1CqrMG6Ztw bFQdAYJMYXW0X90gFgIWT/bFCTX7aq2bH1uUu/ba+NucAtmPwS1GIBh8xoS9PjPEcU0F z/MM+BG7S9c+ReAgjhyazxClFDiOIZ5c9g7gJQPy/nDaenN/lMBZ7hcSCIMIwYPfWgFQ J/pZ+K9PCdIRvHhgfeePmEusl7uAkWrBOMVlqJ5ozEyEzQZ672DlN0xcIt7XQja01DN1 mLwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=eMZJz01m; 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 j74si1312295otj.246.2020.03.11.06.38.58; Wed, 11 Mar 2020 06:39:10 -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=eMZJz01m; 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 S1729512AbgCKNi2 (ORCPT + 99 others); Wed, 11 Mar 2020 09:38:28 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:52921 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729232AbgCKNi2 (ORCPT ); Wed, 11 Mar 2020 09:38:28 -0400 Received: by mail-pj1-f65.google.com with SMTP id f15so1018451pjq.2 for ; Wed, 11 Mar 2020 06:38:26 -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=iwO+qWgIM9f3My2kQh2h35ZK0GeUk2RHl41oBvJStTA=; b=eMZJz01mXe3/ifT+hdwJkqR2hwnztmZqsn/QxoJpTI7gXv9Hq7Mho/K3STadVNsqnJ Jx9efTHHul5gLpGYUqgE+I7KKMWhi54bV6FDskbH3N8PpmF7QAepzxONG3RQPwIfm1FY EFbD9hs6enLO4wjYYQS3FeNT7JymO2VaJToosruysIL++2mTBak1+80XCKaphPE0Pww1 yhtQl+5WsH/zw3Ne0klDkA8tkO1R91+BvoGZftBIF5zK6tiCwqzLubSKJ3NDhj77PGVN EdCBc/RmqQy3E8C4/YfnfMYDa6N3Q1bO7+ACYUGVnVM0JZpGSJogyiUQNz5ZaMDTlLl+ fTjg== 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=iwO+qWgIM9f3My2kQh2h35ZK0GeUk2RHl41oBvJStTA=; b=kK9jIqcWfrhkcQuhAep+uEwQok/ol7CTHjIsJf4MmSqsOQ9EspmANVHGyjhiqjNFH9 CzbodLzpzJxfIuE3blTq4OZMUB+2JqVFSuf+MgNSWIKcz3uI5S/HpqbYOMelzZrhqvTP 4a0ULJZqNTkyhlggvnw8wVF5o7txAvadLtFUuVC+C7PTCxgxz07f1u3x7Gm/klHBPdrC F/2xfPP8CNfyjifCsjVSxxCkQMcV86rqkDDDZMC74z2z2xjyP9pE+f3RjFclLBTaGLGN ZM1M65TdlO2gwQThFJOjipUS6DlxjFNOR0T5w9JCgMAlyoY8dhWF03+YVoGQFqWv9Fby Mydg== X-Gm-Message-State: ANhLgQ3RUl4QxpV3yk/ukjXr1c10XuQrB6BUXF3C2fYaBCkOliOD21KP aXl2ydL8BehW/72QKaf7KxI= X-Received: by 2002:a17:902:bcc5:: with SMTP id o5mr3126671pls.174.1583933905596; Wed, 11 Mar 2020 06:38:25 -0700 (PDT) Received: from localhost.localdomain ([2405:204:287:fb4d:18bc:a849:c699:3914]) by smtp.gmail.com with ESMTPSA id k5sm5668922pju.29.2020.03.11.06.38.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 06:38:25 -0700 (PDT) From: Shreeya Patel To: 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, shreeya.patel23498@gmail.com, Larry.Finger@lwfinger.net Subject: [Outreachy kernel] [PATCH] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions Date: Wed, 11 Mar 2020 19:08:11 +0530 Message-Id: <20200311133811.2246-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 --- drivers/staging/rtl8723bs/hal/sdio_halinit.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index e813382e78a6..643592b0bd38 100644 --- 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; rtw_write8(padapter, REG_RXDMA_AGG_PG_TH + 1, valueDMATimeout); rtw_write8(padapter, REG_RXDMA_AGG_PG_TH, valueDMAPageCount); -- 2.17.1