From: Michael Straube <straube.linux@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Larry.Finger@lwfinger.net, phil@philpotter.co.uk,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Michael Straube <straube.linux@gmail.com>
Subject: [PATCH 2/5] staging: r8188eu: convert two u8 variables to bool
Date: Sun, 20 Feb 2022 11:02:09 +0100 [thread overview]
Message-ID: <20220220100212.7466-3-straube.linux@gmail.com> (raw)
In-Reply-To: <20220220100212.7466-1-straube.linux@gmail.com>
The variables bScanInProcess in struct mlme_priv and bpower_saving in
struct pwrctrl_priv are both unsed to store only boolean values true
and false. Convert them from u8 to bool to avoid type casts in the
function Update_ODM_ComInfo_88E().
Signed-off-by: Michael Straube <straube.linux@gmail.com>
---
drivers/staging/r8188eu/hal/rtl8188e_dm.c | 4 ++--
drivers/staging/r8188eu/include/rtw_mlme.h | 2 +-
drivers/staging/r8188eu/include/rtw_pwrctrl.h | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_dm.c b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
index 09e78c4855f9..082104c9b2e8 100644
--- a/drivers/staging/r8188eu/hal/rtl8188e_dm.c
+++ b/drivers/staging/r8188eu/hal/rtl8188e_dm.c
@@ -42,8 +42,8 @@ static void Update_ODM_ComInfo_88E(struct adapter *Adapter)
dm_odm->pSecChOffset = &hal_data->nCur40MhzPrimeSC;
dm_odm->pBandWidth = (u8 *)&hal_data->CurrentChannelBW;
dm_odm->pChannel = &hal_data->CurrentChannel;
- dm_odm->pbScanInProcess = (bool *)&pmlmepriv->bScanInProcess;
- dm_odm->pbPowerSaving = (bool *)&pwrctrlpriv->bpower_saving;
+ dm_odm->pbScanInProcess = &pmlmepriv->bScanInProcess;
+ dm_odm->pbPowerSaving = &pwrctrlpriv->bpower_saving;
ODM_CmnInfoInit(dm_odm, ODM_CMNINFO_RF_ANTENNA_TYPE, hal_data->TRxAntDivType);
diff --git a/drivers/staging/r8188eu/include/rtw_mlme.h b/drivers/staging/r8188eu/include/rtw_mlme.h
index 1e16fa615b94..d418d57f99b6 100644
--- a/drivers/staging/r8188eu/include/rtw_mlme.h
+++ b/drivers/staging/r8188eu/include/rtw_mlme.h
@@ -310,7 +310,7 @@ struct qos_priv {
struct mlme_priv {
spinlock_t lock;
int fw_state; /* shall we protect this variable? maybe not necessarily... */
- u8 bScanInProcess;
+ bool bScanInProcess;
u8 to_join; /* flag */
u8 to_roaming; /* roaming trying times */
diff --git a/drivers/staging/r8188eu/include/rtw_pwrctrl.h b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
index 2d5298373d74..7c3cb895c3cd 100644
--- a/drivers/staging/r8188eu/include/rtw_pwrctrl.h
+++ b/drivers/staging/r8188eu/include/rtw_pwrctrl.h
@@ -49,7 +49,7 @@ struct pwrctrl_priv {
u32 alives;
struct work_struct cpwm_event;
- u8 bpower_saving;
+ bool bpower_saving;
u8 reg_rfoff;
u8 reg_pdnmode; /* powerdown mode */
--
2.35.1
next prev parent reply other threads:[~2022-02-20 10:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-20 10:02 [PATCH 0/5] staging: r8188eu: odm cleanups Michael Straube
2022-02-20 10:02 ` [PATCH 1/5] staging: r8188eu: remove ODM_CmnInfoHook() Michael Straube
2022-02-20 10:02 ` Michael Straube [this message]
2022-02-20 10:02 ` [PATCH 3/5] staging: r8188eu: remove enum odm_bw Michael Straube
2022-02-20 10:02 ` [PATCH 4/5] staging: r8188eu: convert type of pBandWidth in odm_dm_struct Michael Straube
2022-02-20 10:02 ` [PATCH 5/5] staging: r8188eu: remove ODM_CmnInfoUpdate() Michael Straube
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=20220220100212.7466-3-straube.linux@gmail.com \
--to=straube.linux@gmail.com \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=phil@philpotter.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.