Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp2999202pxb; Fri, 8 Oct 2021 22:08:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwJk4rwSkre6xHGNlXyPXvQuslPqgCnV+kJ0/V0P0uwRElADTiP+URENW9EhCRsrBBKmEnV X-Received: by 2002:a17:906:3383:: with SMTP id v3mr9534455eja.213.1633756088007; Fri, 08 Oct 2021 22:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633756088; cv=none; d=google.com; s=arc-20160816; b=Pq3wY8wA365jV5gVPv3eSGsrRetgc4/U2Jq5hKrPVZidbBlxwOc7qsMW+wlUFfZjm0 apg7k1Ro9VgoJGjvktPoOK6gO0n5nZySblKZ6XrljREu96RQqX4YodfdQKs/jtdvUpaj tTfHXHe1TEZxW59vfBu2388hUVgvysW1qJbcDesdvwiOxmh7+8wW8QILh7D1avpo3ued Du6/oBMDL3HFlPkl4/kq6K7ma9fFEjtxEc1qKFOcTpUAfRoVFNO6qHhwntJHUjuT1rQB zXf7sJJOK4zFnajQpdYS5bxtYVUctTy6D6FVEf7PSKHMtLZv9opFQvecwZUM18ypoq23 PoOA== 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=RCPTshEDJD1Y+rfEbp8XH1g9vPebJXz3+gWAjl+hT5g=; b=Kf13CbCm8lqFpp+ajomXMVBixyMLvpfu7fudcRfLYZBMR2dVKH0cGKf0klaRoYdikL Duihp9sdORh0Ur+TtM2kymrvmZV6EcrzUHN0qnuQiTjUVV42PvOJ8reELs+5e87VQ1Q+ rRxg49WwT3AzSjzeAGqCQUKXE+aeGSnVeoLWH0teSu1JE0xhF67ZwWGWhkYSgGQBHUlu yyVpt829/y4jtsoE3cKCjjS6j58c/pKt8B119hAX4ylJriC7FmWBpE/Jtx6Gh6gDb5Yr nruJQsjlkVNXVu78l94rxCNpnXMuPcjQrJ9iMydWNjyjiglYaWdFGvNkukDMKpM9A/zc RGzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=EIJ5Mz+i; 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 br21si1969775ejb.612.2021.10.08.22.07.41; Fri, 08 Oct 2021 22:08:07 -0700 (PDT) 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=EIJ5Mz+i; 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 S233733AbhJIFIS (ORCPT + 99 others); Sat, 9 Oct 2021 01:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229596AbhJIFIP (ORCPT ); Sat, 9 Oct 2021 01:08:15 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D7CEC061570 for ; Fri, 8 Oct 2021 22:06:19 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id n11so7043487plf.4 for ; Fri, 08 Oct 2021 22:06:19 -0700 (PDT) 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=RCPTshEDJD1Y+rfEbp8XH1g9vPebJXz3+gWAjl+hT5g=; b=EIJ5Mz+icS1YZj8r0R1Nc8L1pvrdj0GhkTBuGyuhtY2XcPQDw48WeA3M2t8AcrjNPO 7sGDkLLKNqvqXNdUZXW27u44R/xEJS06uTOYFTx5v4PFtcmdm2XmW34rhHpOwfuSYElO VgAAH2C8NT0pshjoqZ4wfKGFuoL8m1Wqu9Uyp4r49xQZwKmuq169yLQZqqIyw2VNOKN7 mxWampOIacsBfGY92ms76f97AZvX4T/chjTi/pov3q07MwUhv+zKAFrv5+0bVntpDvkF vfRBabI66ToZ4R2JUABelFWkdin2LB0Y7UBKcomjF/qZjEHJQ76FND/JUFASsYE/KQlw HIjg== 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=RCPTshEDJD1Y+rfEbp8XH1g9vPebJXz3+gWAjl+hT5g=; b=pqeXpB9ay9KXIj+qFZVVFGmdsXZTBHaJ9B+ki0JtdUN02nriOD00Q0VWsRAOnJq/fT UmMy5zqg9idPc23lJ2nntM7RNuj8qfSY6qxC9DJo2hNG7lGodVotMSPFf/q8u2sNd9ga /wXPX2cxA7um84cuaibd/LxHh8me2U9ldRzAlaFMQgqPXMadiMJ/CPthArh+Xdxs6YyI rRWB/M/2f1AOPn1CtYSNppIC4bhpI93Fq7HfCEZLweaysjISUm7nQcd2MqdUmS2C5Bs8 muXj0QJ2InQ8PPq1NAStOjDIWvc27Hb5uheOrZNrZSk2nf4agQnCeu7dNIq8PrABG84P zm3A== X-Gm-Message-State: AOAM5328/f7s5ocnbsrJE3yA2m/i6UCOA5m5vQC/+ilkB7lhThk4TFUT xuWpYiiDQoNd9Y/h9kMysq4= X-Received: by 2002:a17:902:a40c:b029:12c:17cf:ab6f with SMTP id p12-20020a170902a40cb029012c17cfab6fmr13119033plq.71.1633755978416; Fri, 08 Oct 2021 22:06:18 -0700 (PDT) Received: from user ([223.230.43.197]) by smtp.gmail.com with ESMTPSA id w15sm829770pfc.220.2021.10.08.22.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 22:06:17 -0700 (PDT) Date: Sat, 9 Oct 2021 10:36:12 +0530 From: Saurav Girepunje To: gregkh@linuxfoundation.org, fabioaiuto83@gmail.com, ross.schm.dev@gmail.com, fmdefrancesco@gmail.com, zhansayabagdaulet@gmail.com, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Cc: saurav.girepunje@hotmail.com Subject: [PATCH] staging: rtl8723bs: core: merge the if conditions 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 merge the two consecutive if conditions in rtw_set_rpwm(). Both are having same condition to check. Signed-off-by: Saurav Girepunje --- drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c index a392d5b4caf2..5292f90251e0 100644 --- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c @@ -272,11 +272,11 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) pwrpriv->rpwm = pslv; cpwm_orig = 0; - if (rpwm & PS_ACK) + if (rpwm & PS_ACK) { rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_orig); - - if (rpwm & PS_ACK) _set_timer(&pwrpriv->pwr_rpwm_timer, LPS_RPWM_WAIT_MS); + } + rtw_hal_set_hwreg(padapter, HW_VAR_SET_RPWM, (u8 *)(&rpwm)); pwrpriv->tog += 0x80; -- 2.32.0