From patchwork Thu Jun 22 11:16:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 9804051 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AEB360329 for ; Thu, 22 Jun 2017 11:17:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AEA6209CD for ; Thu, 22 Jun 2017 11:17:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F21028600; Thu, 22 Jun 2017 11:17:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA5DC209CD for ; Thu, 22 Jun 2017 11:17:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753238AbdFVLRB (ORCPT ); Thu, 22 Jun 2017 07:17:01 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33603 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753214AbdFVLRA (ORCPT ); Thu, 22 Jun 2017 07:17:00 -0400 Received: by mail-pg0-f67.google.com with SMTP id u62so2022791pgb.0 for ; Thu, 22 Jun 2017 04:16:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=tmbgHEZM7bybVUpsBLlvPrq9IxufNy1IzP8CzQlrlro=; b=R5M3rwuBtCs/f/qqbGerW6xhCgQSmu8rphvw1Zl6a+l5frJmDF2BqOHzsW+9KwReWs QbCKEzi40wpy2m3S8BgZ57IycG2LuMnYxAGy3RINlRsco8F+Bz6tGcgDfHtHpOi6Xesj qZ8Ze3ANiLNe1PkyYHiYx0heQyuZAprd3vP/ZkX7dBUz8EhO3Si9X+S3l6HEuFcrn6KP FW03Q+5TGzSA72pqdEcbgCfegFG7oJH5T59LdfW/InElwsu9mg9ce46e+Wh7FdTW9RTA NNgefqmy0RuWRl0Wf/TTw9Lht/icy+nZCd8yBG5ctU7UPK/Dp/O8rqp84nZh6/xLHsU4 emyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=tmbgHEZM7bybVUpsBLlvPrq9IxufNy1IzP8CzQlrlro=; b=p9D6JTBcD7qD88xmAwk/0kYUY7PKHGgDRb0Vmc5DgLBYqHZzEhiMKvXOfp1gFGntXc R8SHTquL3FPjyA8hNCb6S285wmQSNB5JjXnNHWkGD5c7GG+7gQTRFYiUNmAsb2/9lzCc LAZaDEOLYanj9r8Iy1gj9O1cyU7WBXQyvR7kF2rNDWtoq2/IDGpr7ygp2QtFNmsP/uCk GaKAUhTv+Ga3tbMVZeaNkkrcMEdYKjTHyJsAteCQ/loglxBvY0/PnV2+FDXEKO0hLUAa qtSUI/WXb4J1zvxte8IiHOCuLXA1/zO1up+WiRwOYdNZBH7/mu8rNtXnpA1j//hFNLjG CwHw== X-Gm-Message-State: AKS2vOzzlqPRy95IBOQPhVPNV/VtG90430axukk1FLHM68ISvUT6gyle V3YoFNT5FFf106hE X-Received: by 10.84.143.68 with SMTP id 62mr2335534ply.123.1498130219190; Thu, 22 Jun 2017 04:16:59 -0700 (PDT) Received: from symbol-HP-ZBook-15 ([223.31.70.102]) by smtp.gmail.com with ESMTPSA id t128sm3230170pfd.64.2017.06.22.04.16.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 22 Jun 2017 04:16:57 -0700 (PDT) Date: Thu, 22 Jun 2017 16:46:55 +0530 From: Souptick Joarder To: Larry.Finger@lwfinger.net, chaoming_li@realsil.com.cn Cc: linux-wireless@vger.kernel.org Subject: [PATCH] rtlwifi: Remove unnecessary conditions Message-ID: <20170622111655.GA4891@symbol-HP-ZBook-15> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP As wmm_enable is initialized to false, hence the else condition never execute and boundary is assigned with TX_PAGE_BOUNDARY. So the if-else condition can be removed and boundary will be assigned with TX_PAGE_BOUNDARY. Signed-off-by: Souptick Joarder --- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c | 6 ------ 1 file changed, 6 deletions(-) -- 1.9.1 diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c index f95a645..e9c5f6a 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/hw.c @@ -845,13 +845,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw) pr_err("Failed to init power on!\n"); return err; } - if (!wmm_enable) { boundary = TX_PAGE_BOUNDARY; - } else { /* for WMM */ - boundary = (IS_NORMAL_CHIP(rtlhal->version)) - ? WMM_CHIP_B_TX_PAGE_BOUNDARY - : WMM_CHIP_A_TX_PAGE_BOUNDARY; - } if (false == rtl92c_init_llt_table(hw, boundary)) { pr_err("Failed to init LLT Table!\n"); return -EINVAL;