From: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>,
outreachy-kernel@googlegroups.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Cc: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Subject: [Outreachy kernel] [PATCH v2 4/5] staging: rtl8723bs: Change the type and use of a variable
Date: Sat, 10 Apr 2021 17:00:07 +0200 [thread overview]
Message-ID: <20210410150008.5460-5-fmdefrancesco@gmail.com> (raw)
In-Reply-To: <20210410150008.5460-1-fmdefrancesco@gmail.com>
Change the type of fw_current_in_ps_mode from u8 to bool, because
it is used everywhere as a bool and, accordingly, it should be
declared as a bool. Shorten the controlling expression of an 'if' statement.
Signed-off-by: Fabio M. De Francesco <fmdefrancesco@gmail.com>
---
Changes from v1: No changes.
drivers/staging/rtl8723bs/hal/hal_intf.c | 2 +-
drivers/staging/rtl8723bs/include/rtw_pwrctrl.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_intf.c b/drivers/staging/rtl8723bs/hal/hal_intf.c
index 96fe172ced8d..8dc4dd8c6d4c 100644
--- a/drivers/staging/rtl8723bs/hal/hal_intf.c
+++ b/drivers/staging/rtl8723bs/hal/hal_intf.c
@@ -348,7 +348,7 @@ void rtw_hal_dm_watchdog(struct adapter *padapter)
void rtw_hal_dm_watchdog_in_lps(struct adapter *padapter)
{
- if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode == true) {
+ if (adapter_to_pwrctl(padapter)->fw_current_in_ps_mode) {
if (padapter->HalFunc.hal_dm_watchdog_in_lps)
padapter->HalFunc.hal_dm_watchdog_in_lps(padapter); /* this function caller is in interrupt context */
}
diff --git a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
index 0a48f1653be5..0767dbb84199 100644
--- a/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
+++ b/drivers/staging/rtl8723bs/include/rtw_pwrctrl.h
@@ -203,7 +203,7 @@ struct pwrctrl_priv {
u8 LpsIdleCount;
u8 power_mgnt;
u8 org_power_mgnt;
- u8 fw_current_in_ps_mode;
+ bool fw_current_in_ps_mode;
unsigned long DelayLPSLastTimeStamp;
s32 pnp_current_pwr_state;
u8 pnp_bstop_trx;
--
2.31.1
next prev parent reply other threads:[~2021-04-10 15:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 15:00 [Outreachy kernel] [PATCH v2 0/5] staging: rtl8723bs: Change Fabio M. De Francesco
2021-04-10 15:00 ` [Outreachy kernel] [PATCH v2 1/5] staging: rtl8723bs: Remove camelcase in several files Fabio M. De Francesco
2021-04-10 15:00 ` [Outreachy kernel] [PATCH v2 2/5] staging: rtl8723bs: include: Fix misspelled words in comments Fabio M. De Francesco
2021-04-11 6:40 ` Greg KH
2021-04-10 15:00 ` [Outreachy kernel] [PATCH v2 3/5] staging: rtl8723bs: core: Remove an unused variable Fabio M. De Francesco
2021-04-10 15:00 ` Fabio M. De Francesco [this message]
2021-04-10 15:00 ` [Outreachy kernel] [PATCH v2 5/5] staging: rtl8723bs: core: Change a controlling expression Fabio M. De Francesco
2021-04-11 6:39 ` [Outreachy kernel] [PATCH v2 0/5] staging: rtl8723bs: Change Greg KH
2021-04-11 7:11 ` Fabio M. De Francesco
2021-04-11 7:17 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210410150008.5460-5-fmdefrancesco@gmail.com \
--to=fmdefrancesco@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=outreachy-kernel@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).