Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp5550118pxb; Sun, 7 Nov 2021 14:59:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLHNyedIT3SEYLdUWylOBbf0QbfhfV2ZQH3GlUAwCIfIrBB2NgCYCwVBmM4myXmLUZyMah X-Received: by 2002:a6b:2ccf:: with SMTP id s198mr1254234ios.101.1636325979848; Sun, 07 Nov 2021 14:59:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636325979; cv=none; d=google.com; s=arc-20160816; b=zWgDjZiaXlEdhRs4950TIB7bW9AJErhsWUUqDmkrraDgMWNreH1bo0MJa0ihOwxKKg 20KXoy7we4bDmCyMhfiy2OLIkkjVHMwg1g1JBiL18Gm72p3kCjGMKyN1uQHZCbOC1I/P ZO9DWypRy21zveOab4BpFaQN+rXdZjjjqvpSfvhRe6iVUAwhS9hTaL9Ea3WgCQf51Xpz fwHYZ+OllQ3OC1mogfuH+3dfyaXYdSh5vEh0v3UKhieXQfkr+oUjx5jr7LNVpBUXYvpA bymLtzcUlqQ8Yqw7OaylLLZ607h42TR3P070V3OgVOytPN4XlVyXN++FKFklRzv3gSdJ dMqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=tRTkUL4b/IclFaICDSMtWkDgnrkgp3k8b9yxWekP0Y8=; b=a4Ed/FsxIOqiOPhV5q9fKFwv9d8PAu8OFYQCfBfBGLFRGMqi2m9Odm0cV8yyhC3f/l q7sNxvVAP+JoSMeT+8FVFkfvQZpCaBEuLfPulnw2/oHqps3xMyEhHCOSP2/HLtum/tFY ZEcAtsNFhWlhpx7vEVbprCy4CWjVaWmYsYN/RocwseFu9NIJHML2RTB6WVvRLbF6YEkt 2mGrp11EUHHxAcKud7dIsbXBvGmqoXTG+MP2QL/B375+lLWwrhvzmtMTp3YzhggMBq47 JSf1Qmw+itxjztPSKnIHWCNBaeCJ3qZMSMb23YVg8c/lQpRdsoEG72Q+5Ybm69iMT7oa 0A6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fDq4DmzK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id j16si32196968jat.65.2021.11.07.14.59.27; Sun, 07 Nov 2021 14:59:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=fDq4DmzK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235059AbhKGSLW (ORCPT + 99 others); Sun, 7 Nov 2021 13:11:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235051AbhKGSLW (ORCPT ); Sun, 7 Nov 2021 13:11:22 -0500 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A9E7C061570 for ; Sun, 7 Nov 2021 10:08:39 -0800 (PST) Received: by mail-pl1-x633.google.com with SMTP id v20so14309676plo.7 for ; Sun, 07 Nov 2021 10:08:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=tRTkUL4b/IclFaICDSMtWkDgnrkgp3k8b9yxWekP0Y8=; b=fDq4DmzKqveY95pRinYiSMpm27KJdKM9s4iv2PCjY3mJA+1A2ZkXSjKXzJbfGfwn6J ejm88XAmveBmsfy/lXwdjUOvTbEKZOkm1H2gjYzKDr7SA+zNfVmukO4/3Md/7laK95z2 JNhHJMhHPT6GtkFKiUCL2oqDVT1iR9TRibcEznkEMZwMLEhcoLCQwQaPJR3+4bKKR5ec 5qPJHJ3oz2bNMpVA9DZ0hd/eibnZZegXEBhePhC4n5OdsZ51mJ31f58K3B7PA5Zf2s8+ CrpXrYGhnFGHx25VtRiBgbI5rIGIs+6HYtj9dYY2ioVzcY35UZQGmxp7tNWiTOVQVjT9 g/Vg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=tRTkUL4b/IclFaICDSMtWkDgnrkgp3k8b9yxWekP0Y8=; b=UNy+mY+7qNchjJaN+kGZqXn8h6breRmi7WbV2WBuonlTBJtAERqkmlzhx4RrE888ic xn34AFmbUUMnoq+yOO/ywEDVyUAIS8R+gJiYzLTnZRjGeBRBjO5GjP0ZCe+BuQeuC6X8 5qcKrUZlvL9mvKc10bz5yn707aO6Lj6KzStyv1MIuUKo+woPp2jXmChc5dvH9+uF53vQ 0juthMSi1qzyxFE+MUF5T5vGAq2hWn+ei8Xhr/uVkAaVr31gIxFyUiqUG3g5txoJJmXI T3+XIFd1uNnKrdhIY2lW3cUy+B6iyyEO570TxU1h6PH4LPtlwN73XIXw7KJpOgX0mqXG zl+w== X-Gm-Message-State: AOAM533uvI+hL7W8e6z4rM6i/xT0v6mfniOzx8mHUe1Pu4dCXIW8CevO AFf6RoQitk1PxOAH8d6/sIQ= X-Received: by 2002:a17:902:7107:b0:142:7a83:6dfe with SMTP id a7-20020a170902710700b001427a836dfemr2938682pll.0.1636308518407; Sun, 07 Nov 2021 10:08:38 -0800 (PST) Received: from Sauravs-MacBook-Air.local ([59.88.109.27]) by smtp.gmail.com with ESMTPSA id r1sm8450445pjm.23.2021.11.07.10.08.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Nov 2021 10:08:37 -0800 (PST) Date: Sun, 7 Nov 2021 23:38:30 +0530 From: Saurav Girepunje To: gregkh@linuxfoundation.org, fabioaiuto83@gmail.com, kushalkothari285@gmail.com, fmdefrancesco@gmail.com, ross.schm.dev@gmail.com, marcocesati@gmail.com, straube.linux@gmail.com, philippesdixon@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: rtl8723bs: core: avoid unnecessary if condition Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In function rtw_lps_change_dtim_hdl remove the if condition check to compare the pwrpriv->dtim to dtim . If both are not equal dtim is getting assign to pwrpriv->dtim. But if both are equal assigning dtim to pwrpriv->dtim will not make any difference on value. So remove the unnecessary if condition check. Signed-off-by: Saurav Girepunje --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index 639459d52261..bddfc02fb73e 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -1498,8 +1498,7 @@ static void rtw_lps_change_dtim_hdl(struct adapter *padapter, u8 dtim) mutex_lock(&pwrpriv->lock); - if (pwrpriv->dtim != dtim) - pwrpriv->dtim = dtim; + pwrpriv->dtim = dtim; if (pwrpriv->fw_current_in_ps_mode && (pwrpriv->pwr_mode > PS_MODE_ACTIVE)) { u8 ps_mode = pwrpriv->pwr_mode; -- 2.33.0