* [PATCH] staging: rtl8723bs: core: avoid unnecessary if condition
@ 2021-11-07 18:08 Saurav Girepunje
0 siblings, 0 replies; only message in thread
From: Saurav Girepunje @ 2021-11-07 18:08 UTC (permalink / raw)
To: gregkh, fabioaiuto83, kushalkothari285, fmdefrancesco,
ross.schm.dev, marcocesati, straube.linux, philippesdixon,
linux-staging, linux-kernel
Cc: saurav.girepunje
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 <saurav.girepunje@gmail.com>
---
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-07 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-07 18:08 [PATCH] staging: rtl8723bs: core: avoid unnecessary if condition Saurav Girepunje
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox