Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1560824ybh; Fri, 13 Mar 2020 03:29:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvX88fc8WjW1O20h3amkdYIRJYFXX9FlNWNjB55WOqe4b2IrHJekKp8mS+cb7ARFPz4cbFJ X-Received: by 2002:a05:6808:907:: with SMTP id w7mr6109375oih.78.1584095399271; Fri, 13 Mar 2020 03:29:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584095399; cv=none; d=google.com; s=arc-20160816; b=SSAfKoUPNpjOlw19Tv5XK9U6RWUPzdbI/FZgKpN/n3nVSQ3CzcshizhyuFfTPsoFur V1otYrL4g0O8Vl/WS8LWIgiXkzCgsH3dpRBy1DHKyaVekSg4UD5lSITkEvrkUUwvcUra 3dm+HNBcONRDCHXyM+fyLOy/xXQwLoTmBVt8eaP1yAcwiqLtxHI5hh4Nrg72vlztBzdA 1X7iUKzMSAhPdb/aG/twu7AMvcG4gtaHnWi0LrSfp4qWpg7NRSsnJ5mbJE2wP8r1DO6e nGSV3fxYgCKkFrz2Wl+Zp3d0mLpo9/rttqyVW+gn28gMNKVneMTuAlHlxzQQ88KdMBUR QBjw== 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=kqXMRjosvrMwbkpWYYUMv/eKp41LgZaQN2jfs/TMCUU=; b=sm5qdUx/1EyNkaamjQ3u9tdSTIXM7WHVZIg/hOpArVACgJsFJze8fb/8iLuriPiPS7 uPXIS1hyvxKfNy/DWCvPlAcVYoAq5Vlg2NwoCirNF5lW+1oYN4SX1Czmuo/rgMur+34e /8WBmewl8a41FkU1XPP3PLhU8GEYe7nEghcWcOzFSzXLnH/Yl/wUJXkYVgTxIpFgIFPa pok1a6SWLhRAAGFg2Fe7qULM/w096Ej0fBqlTwHImw6DjJkycDnqSP8JvH4gQeqbpDiB 4Mmst2sv+69Qqwyb+ATiTFir+o9ClYjkjI5TYNPvNfwOgYWEVC0fe9YpkKbwGKlYWHTT rXTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EWbg2LKq; 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 h4si4232962otr.51.2020.03.13.03.29.46; Fri, 13 Mar 2020 03:29: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=EWbg2LKq; 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 S1726426AbgCMK30 (ORCPT + 99 others); Fri, 13 Mar 2020 06:29:26 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33260 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726055AbgCMK30 (ORCPT ); Fri, 13 Mar 2020 06:29:26 -0400 Received: by mail-pl1-f196.google.com with SMTP id ay11so4057325plb.0 for ; Fri, 13 Mar 2020 03:29:25 -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=kqXMRjosvrMwbkpWYYUMv/eKp41LgZaQN2jfs/TMCUU=; b=EWbg2LKqIyxcTZt54OZrlCbltZOHFk7QAr/BjENsjZfWl63N37tNSXyfPxxA0hTRu3 or4rZWujQhztrFqJsYFJUd8k74Q1F4Tqhf2S3hd6rGIxw40W28bThPpt6NfqCcHbHQWA 4FXoQ7Pd1UOft3mx57iVigFUPwH0cIsV5yat2JaHnEto1jFCq+jPPaepNxUksBrEPIid vY9b4GzJoo4MUSaptYYtogEF/CGnjXQOAaYUFXQZCP0VmpL2vY5j+nwNFN0guSeNqH7Z D+3voASXKTB12c7Rt0W6n1c5MEXIcUb0v8hC0Y4iv+tApge+jorRS2kNNs5Gpg95KcqX CtFw== 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=kqXMRjosvrMwbkpWYYUMv/eKp41LgZaQN2jfs/TMCUU=; b=kuAejmHZlkWJXls0rYoMt4cpvilA0NfAokzlwvPh2k3HaCNN503aEjagLhXlCQ8kqm STGfVmBQ+LDaUKiUBT1tP/dmvopl4pXvf/nv9OXSQVu4TwGmZz6hXDU5Cesh74ReNczE LFVGxYR9rwAPQleP9/NkZt4F1EPtBrS4MtdVi44VkezAJAWSHDoHKXEFI4JzO8zwlg2P L8qfpWbTLIMvy6t0mBge6rKsChW7bSzRElUIPBbtf8nTeu0FPZkHRQezNAWb/wwI6/Zu w+Ygjfjae4nFhRwY0yifTI1wikxmXxfS7ryi4VNxQASFBYpTu+P3k5T9kqE8InxTmBEi 0EIA== X-Gm-Message-State: ANhLgQ0QZI6jW+7GpzZhCWjE2MDuUlNJGH+Stc2al4DyL3d3sl4XEHsc yoXY4wW8hPylL2kp4jxkT8pLO/Og X-Received: by 2002:a17:902:7592:: with SMTP id j18mr12588240pll.180.1584095365090; Fri, 13 Mar 2020 03:29:25 -0700 (PDT) Received: from localhost.localdomain ([2405:204:22f:d418:f8a5:7ca8:f99b:fa30]) by smtp.gmail.com with ESMTPSA id u24sm55719326pgo.83.2020.03.13.03.29.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Mar 2020 03:29:24 -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: rtw_mlme: Remove unnecessary conditions Date: Fri, 13 Mar 2020 15:59:12 +0530 Message-Id: <20200313102912.17218-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. Also, remove the unnecessary else-if condition since it does nothing. Signed-off-by: Shreeya Patel --- Changes in v2 - Remove unnecessary comments - Remove unnecessary else-if condition which does nothing. drivers/staging/rtl8723bs/core/rtw_mlme.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme.c b/drivers/staging/rtl8723bs/core/rtw_mlme.c index 71fcb466019a..d7a58af76ea0 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme.c @@ -2772,16 +2772,7 @@ 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; - } - } else if (pregistrypriv->ampdu_enable == 2) { - /* remove this part because testbed AP should disable RX AMPDU */ - /* phtpriv->ampdu_enable = true; */ + phtpriv->ampdu_enable = true; } /* check Max Rx A-MPDU Size */ -- 2.17.1