Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1578430ybh; Fri, 13 Mar 2020 03:50:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtaRhj+kOih1qzjZWa/PoaBoRFQvWxi/4Pv6vTvrhkg4/8oXARMEBbLSYGiMBlZoUngydvn X-Received: by 2002:a9d:798d:: with SMTP id h13mr10793509otm.25.1584096630071; Fri, 13 Mar 2020 03:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584096630; cv=none; d=google.com; s=arc-20160816; b=m4fm8s/CLA3sRmltnnsMAl8OkntUINjrVtz6j0e5kbkNu6XsHhE0V714ZGgmZ5mXBC h6zrTfOybimWbvZKgvdsYWp8Mmwczk60fRLbD/nCWLzm4xlu/N5nLK908McldnrxbvXx nJguxX+6Xlq6m0IQTMc8g2b3FOmFCHniwz8butyfEOOScM7Q574HER1uHd0It1tp8zpc dBvVG2BT34XcJ5vf0jtP5FGR/TM/80m41xlusKf0GZg5MgRuNgn7ATUdx+RI10O5kGwL UPDIEEW+g0PQC3THiUdW7ampukgiKeQEXrzFuddRheiKkh/JCv50WM8lowAE6dvaAbO1 OsDw== 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=0Cbo1xS6vW/dNK1bnJUvlE5supQYYnA1AahW7h/MscPt6ere5N6EI+VrXpzuxUvh4f 8mB/T/FNnhj6wTKEiM/2lHl3eyDdsH6ju+tX++YUyYRUbOwBOa0HxhCovP14e8YmnB5a 8PqODgaPK1SfF0IHXnU8VoMm5ye4K5wBpJwdqA8Cj0vdVnEDEerVZd6M5kfHBev0wo03 LxPrQ7tWw3s0W0UFFy2zZ4wjnhu1ZuTOoP3GcJSMc3cyYv0btGR4AVUMBGZXIJo6L/RX 73+H9mBoeNCh3TihWzPP6A3U0UT94f5LPbBXO+N7Y02p+ZiY9KLigXfiNxnzjXw5Yzag Y5hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vbpA6qyC; 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 v10si4135102oth.136.2020.03.13.03.50.17; Fri, 13 Mar 2020 03:50:30 -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=vbpA6qyC; 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 S1726488AbgCMKtf (ORCPT + 99 others); Fri, 13 Mar 2020 06:49:35 -0400 Received: from mail-pj1-f67.google.com ([209.85.216.67]:35929 "EHLO mail-pj1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726387AbgCMKtf (ORCPT ); Fri, 13 Mar 2020 06:49:35 -0400 Received: by mail-pj1-f67.google.com with SMTP id nu11so885276pjb.1 for ; Fri, 13 Mar 2020 03:49:34 -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=vbpA6qyCkQZysoUFRYL8Xxn2pnO4dRlSazfhuWfmQUOk9n6sko2frj+BH233MglTZb 76MOtY7REhMlznesQtdgjfFmpKRwaUVV8WfwRISpiZ5opVQaboLUU3gEb9pvqpcI6Iss 0wASXvaqSwh9PcouLcW3OCaniq4chLiNblYClT0UDpq3R7b+zTSjGyQvdQ06VZwZgDPf tbXcKCtTmSvOUWIv0a6U9tMW49xwSAIVjFsDnAFiv9Ie+5nCAWpBNzpsgh44t1dQiihT 9xaQTakJCyH3KphdV7CB9fj4UIT5c2jQE5wgMbTPi+qWPmUnG2ka9bU1bXwL7AsjXxyB lV9w== 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=MvS2Cc9Igt1tLVhhWz2nN8NyO65IXZ9Leuu/ubVlIe/xro2g4rXo5iOfbsJMjy61iW SaipJMVAoMkp8n6y5YCBdlLY8yrcx6/Yey3C9qpHnFJ/bO7vMQKDf35xD/t1dLaI03Ka NThatFvuMcTCJpkhDLRKm06Bqv/0/zhq0XhY83vRXwO7WF4QRfwUlweuGE7Rtuvl65ld cuUDD1ZjkF3Lb4BKMTWb1VxZufwgQbou9gu1jAUhxz/e4dydVYylNaOLHruqLBbXEcdV 0SuzjEunLAXoRmnflZArfd6VvKO581jEiExpmRvHuyII5mUEbkgU9Aiol7pAcd9B+vYt 0bXQ== X-Gm-Message-State: ANhLgQ1wKfH2zLuajguLMwCmskqs0+8aaD2yeIBBpkp0Z4M//wfeRE/9 VYL2htgl+XjQd3pqy9Icmjg= X-Received: by 2002:a17:902:a408:: with SMTP id p8mr12893133plq.132.1584096574274; Fri, 13 Mar 2020 03:49:34 -0700 (PDT) Received: from localhost.localdomain ([2405:204:22f:d418:f8a5:7ca8:f99b:fa30]) by smtp.gmail.com with ESMTPSA id gx7sm11718756pjb.16.2020.03.13.03.49.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 03:49:33 -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 v2] Staging: rtl8723bs: sdio_halinit: Remove unnecessary conditions Date: Fri, 13 Mar 2020 16:19:20 +0530 Message-Id: <20200313104920.19974-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