Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp586747ybh; Wed, 11 Mar 2020 06:59:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtWoNxBuV+k/EAPJhzl3hoBJYrGsSOQHPhFmZs3EkFRmq+rT5zDiFiLslnRaTegEYCoCf1+ X-Received: by 2002:aca:ed54:: with SMTP id l81mr2094761oih.69.1583935199766; Wed, 11 Mar 2020 06:59:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583935199; cv=none; d=google.com; s=arc-20160816; b=IsCzNCBoTUiNhLoQ7gxN3TbW7k4w55e08V4EFjm32lIQeuUHbW6Ga78QDaNDHTgjun kXxo0Lpu3F/+DBWlHPmvmctIJHq2X4vL1Kf6AIH+ZqiEpZ/D6U9f4YwrpX6TeWE/IMKg xkivhmO04b/Z/l2vfkba1x1KhjpcFqm52bhHWWnArzCKwrBprix7Ypj6rRuBjZg7R+BQ KsGqBlFyAjxmzNvezpV0040UFSE0+tz5oCEJooIAzCaA8NpntPQe8gMFbgx3dKNxWNy6 +vrItZeM4fF2iU99wxYwKWEeJ5lUtAI0yQonsqh3mfefBnoAsq2Eslr/UY+YKHcDZ6TZ HJBQ== 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=Rsh1wp6Fd0Yl2sa4e9abEs0k+S0Of//VtbBDH+QzLew=; b=GGy4QGRpQ7ARZ2BeSG6oRErU5X7gwylW9TTvVSFKrh+hTI/16josgqumU80MQmRmp0 dJ8ZR1rKSe5bTzcgeA3hPWNpdzPUCIGWV1YWbY9x8ioMdcXjO7wcJzW6fWnhtvw9pnFK jXR92G0pwzKBAD0claVtBKMEkGyeN4/gzqslxghh+6lB0dr3p7zbWFiOL75bRiogJSVy h96VWpj9cNhyB9BtoHRVMT5hRQUcKMmqsXvVMMlZJbd3ySnm/bz3urs+fbdmooF1V2TP 9re6QF2DY5V1SCpYWQeFADO5n3jOckyh+avNHBm/7padJdKwZa6Bhl/rbN1YJyJi44Rb kU7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ZMg/4Ose"; 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 n63si1176688oia.144.2020.03.11.06.59.48; Wed, 11 Mar 2020 06:59:59 -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="ZMg/4Ose"; 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 S1729584AbgCKN7M (ORCPT + 99 others); Wed, 11 Mar 2020 09:59:12 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:35969 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729479AbgCKN7M (ORCPT ); Wed, 11 Mar 2020 09:59:12 -0400 Received: by mail-pg1-f195.google.com with SMTP id c7so1266704pgw.3 for ; Wed, 11 Mar 2020 06:59:11 -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=Rsh1wp6Fd0Yl2sa4e9abEs0k+S0Of//VtbBDH+QzLew=; b=ZMg/4OseM+M79oricWCYBpDoxsS2CVvN4cPMGCEe8P3CGHaPQ0w7BTSAkx274h4QJy +8yaIiFu0l5ahpzCUGJsrPJIIbm4POb1T75sMToETl85JplEDp0glnC61nH58DoykVZy +Tn5OCaCkGz4aqcAGCmadxrFeFBIf/k98brvePZLxpqZZyKO1e9bHE0CEsvcHcK8lnDX nUoKoHQGFQmF4aYwItlXO2UWvcaqVTwAJR2Bg1nq7npwmiEl3RA0SnjMwavfQjK1Mpxj D6khngidz4Q8aTQnmZm1XshHCvhTzf+44UJsjQx2MwnHDxHqcDZs/44mxarwMROEjBle vcBg== 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=Rsh1wp6Fd0Yl2sa4e9abEs0k+S0Of//VtbBDH+QzLew=; b=GlSM43A46jGkA8epfAYEjBrP+dEpW8/M3sMq0hiWMaNAUl9D/784aTJeaJtb04Labg 0NPJZ9ud0NT4+8vvk5Gq3ImZta+sqO+opuIs1d1l5R8vLYX9GQx4T4yLaEfEF1XeR+wc vMjLY/XN4xu3H8hv6oF5T4SWJTufVjCdHmmeLbfwxGM+k9PWj2TI6oZDgt4/GU3dHsN1 kLT3a6ziifwRSt6zc+OyawAvN503dhe89oIih6KnP5T+EftuVnU6U0ojoUKzaOHVf0zV omZqgXC9zs1nTGbjzXM+iREGdqx1f7aWvKVrsSGchib0+DBqPNsKGZDcEbx0KR1CWfE2 AUaw== X-Gm-Message-State: ANhLgQ2SWFnNmYjRcgtr/dDvUyoLDQ3y4/1f46p918aan+vGtq6+0wBi kTiwDZKhLP7EvPz3IeOZpRg= X-Received: by 2002:aa7:914b:: with SMTP id 11mr3101406pfi.69.1583935150671; Wed, 11 Mar 2020 06:59:10 -0700 (PDT) Received: from localhost.localdomain ([2405:204:287:fb4d:18bc:a849:c699:3914]) by smtp.gmail.com with ESMTPSA id b11sm5799287pjc.27.2020.03.11.06.59.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Mar 2020 06:59:10 -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: rtw_mlme: Remove unnecessary conditions Date: Wed, 11 Mar 2020 19:28:59 +0530 Message-Id: <20200311135859.5626-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 unnecessary if and else conditions since both are leading to the initialization of "phtpriv->ampdu_enable" with the same value. Signed-off-by: Shreeya Patel --- drivers/staging/rtl8723bs/core/rtw_mlme.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 71fcb466019a..48e9faf27321 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -2772,13 +2772,9 @@ void rtw_update_ht_cap(struct adapter *padapter, u8 *pie, uint ie_len, u8 channe /* maybe needs check if ap supports rx ampdu. */ if (!(phtpriv->ampdu_enable) && pregistrypriv->ampdu_enable == 1) { - if (pregistrypriv->wifi_spec == 1) { - /* remove this part because testbed AP should disable RX AMPDU */ - /* phtpriv->ampdu_enable = false; */ - phtpriv->ampdu_enable = true; - } else { - phtpriv->ampdu_enable = true; - } + /* remove this part because testbed AP should disable RX AMPDU */ + /* phtpriv->ampdu_enable = false; */ + phtpriv->ampdu_enable = true; } else if (pregistrypriv->ampdu_enable == 2) { /* remove this part because testbed AP should disable RX AMPDU */ /* phtpriv->ampdu_enable = true; */ -- 2.17.1