staging: r8188eu: convert two u8 variables to bool
authorMichael Straube <straube.linux@gmail.com>
Sun, 20 Feb 2022 10:02:09 +0000 (11:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Feb 2022 17:11:03 +0000 (18:11 +0100)
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>
Link: https://lore.kernel.org/r/20220220100212.7466-3-straube.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/r8188eu/hal/rtl8188e_dm.c
drivers/staging/r8188eu/include/rtw_mlme.h
drivers/staging/r8188eu/include/rtw_pwrctrl.h

index 09e78c4..082104c 100644 (file)
@@ -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);
 
index 1e16fa6..d418d57 100644 (file)
@@ -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 */
 
index 2d52983..7c3cb89 100644 (file)
@@ -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 */