* [PATCH 1/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtExist()
@ 2019-08-02 6:24 Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 2/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtControlLps() Nishka Dasgupta
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-08-02 6:24 UTC (permalink / raw)
Change return type of hal_btcoex_IsBtExist from u8 to bool as its only
possible return values are true and false.
Signed-off-by: Nishka Dasgupta <nishkadg.linux at gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 2 +-
drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 8987b5f892c0..73f3d93d2d1a 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -1335,7 +1335,7 @@ void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist)
*true Enable BT co-exist mechanism
*false Disable BT co-exist mechanism
*/
-u8 hal_btcoex_IsBtExist(struct adapter *padapter)
+bool hal_btcoex_IsBtExist(struct adapter *padapter)
{
struct hal_com_data *pHalData;
diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index 6f7514be998f..a91116e5c549 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -22,7 +22,7 @@ typedef struct _BT_COEXIST
void DBG_BT_INFO(u8 *dbgmsg);
void hal_btcoex_SetBTCoexist(struct adapter *padapter, u8 bBtExist);
-u8 hal_btcoex_IsBtExist(struct adapter *padapter);
+bool hal_btcoex_IsBtExist(struct adapter *padapter);
bool hal_btcoex_IsBtDisabled(struct adapter *);
void hal_btcoex_SetChipType(struct adapter *padapter, u8 chipType);
void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum);
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtControlLps()
2019-08-02 6:24 [PATCH 1/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtExist() Nishka Dasgupta
@ 2019-08-02 6:24 ` Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 3/4] staging: rtl8723bs: Change return type of hal_btcoex_IsLpsOn() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 4/4] staging: rtl8723bs: Replace hal_btcoex_Initialize() Nishka Dasgupta
2 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-08-02 6:24 UTC (permalink / raw)
Change return type of hal_btcoex_IsBtControlLps from u8 to bool as it
only returns boolean values.
Change comparison to false within this function; check the boolean
variable directly instead.
Signed-off-by: Nishka Dasgupta <nishkadg.linux at gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ++--
drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 73f3d93d2d1a..85f5371d349b 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -1475,9 +1475,9 @@ void hal_btcoex_SetManualControl(struct adapter *padapter, u8 bmanual)
GLBtCoexist.bManualControl = bmanual;
}
-u8 hal_btcoex_IsBtControlLps(struct adapter *padapter)
+bool hal_btcoex_IsBtControlLps(struct adapter *padapter)
{
- if (hal_btcoex_IsBtExist(padapter) == false)
+ if (!hal_btcoex_IsBtExist(padapter))
return false;
if (GLBtCoexist.btInfo.bBtDisabled)
diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index a91116e5c549..da25f8e98ec7 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -47,7 +47,7 @@ void hal_btcoex_Handler(struct adapter *padapter);
s32 hal_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter);
void hal_btcoex_SetManualControl(struct adapter *padapter, u8 bmanual);
-u8 hal_btcoex_IsBtControlLps(struct adapter *);
+bool hal_btcoex_IsBtControlLps(struct adapter *padapter);
u8 hal_btcoex_IsLpsOn(struct adapter *);
u8 hal_btcoex_RpwmVal(struct adapter *);
u8 hal_btcoex_LpsVal(struct adapter *);
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/4] staging: rtl8723bs: Change return type of hal_btcoex_IsLpsOn()
2019-08-02 6:24 [PATCH 1/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtExist() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 2/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtControlLps() Nishka Dasgupta
@ 2019-08-02 6:24 ` Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 4/4] staging: rtl8723bs: Replace hal_btcoex_Initialize() Nishka Dasgupta
2 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-08-02 6:24 UTC (permalink / raw)
Change return type of hal_btcoex_IsLpsOn from u8 to bool as the
function only returns boolean values.
Modify a comparison of a boolean value to false to instead check that
boolean value directly.
Signed-off-by: Nishka Dasgupta <nishkadg.linux at gmail.com>
---
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 4 ++--
drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 85f5371d349b..d2147a65c1cd 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -1489,9 +1489,9 @@ bool hal_btcoex_IsBtControlLps(struct adapter *padapter)
return false;
}
-u8 hal_btcoex_IsLpsOn(struct adapter *padapter)
+bool hal_btcoex_IsLpsOn(struct adapter *padapter)
{
- if (hal_btcoex_IsBtExist(padapter) == false)
+ if (!hal_btcoex_IsBtExist(padapter))
return false;
if (GLBtCoexist.btInfo.bBtDisabled)
diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index da25f8e98ec7..a0b502c34a25 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -48,7 +48,7 @@ void hal_btcoex_Handler(struct adapter *padapter);
s32 hal_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter *padapter);
void hal_btcoex_SetManualControl(struct adapter *padapter, u8 bmanual);
bool hal_btcoex_IsBtControlLps(struct adapter *padapter);
-u8 hal_btcoex_IsLpsOn(struct adapter *);
+bool hal_btcoex_IsLpsOn(struct adapter *padapter);
u8 hal_btcoex_RpwmVal(struct adapter *);
u8 hal_btcoex_LpsVal(struct adapter *);
u32 hal_btcoex_GetRaMask(struct adapter *);
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 4/4] staging: rtl8723bs: Replace hal_btcoex_Initialize()
2019-08-02 6:24 [PATCH 1/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtExist() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 2/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtControlLps() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 3/4] staging: rtl8723bs: Change return type of hal_btcoex_IsLpsOn() Nishka Dasgupta
@ 2019-08-02 6:24 ` Nishka Dasgupta
2 siblings, 0 replies; 4+ messages in thread
From: Nishka Dasgupta @ 2019-08-02 6:24 UTC (permalink / raw)
Remove hal_btcoex_Initialize as all it does is perform a memset and call
EXhalbtcoutsrc_InitlizeVariables.
Rename EXhalbtcoutsrc_InitlizeVariables to hal_btcoex_Initialize and add
the memset of hal_btcoex_Initialize in order to maintain compatibility
with call sites of the latter (EXhalbtcoutsrc is not called anywhere
else except in now-removed old hal_btcoex_Initialize).
Change return type of new hal_btcoex_Initialize from u8 to void and
remove its return statement as the return value of hal_btcoex_Initialize
is never used.
Change the type of function argument at call site to match the function
parameter of new hal_btcoex_Initialize.
Signed-off-by: Nishka Dasgupta <nishkadg.linux at gmail.com>
---
drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h | 1 -
drivers/staging/rtl8723bs/hal/hal_btcoex.c | 16 ++++++----------
drivers/staging/rtl8723bs/include/hal_btcoex.h | 2 +-
drivers/staging/rtl8723bs/os_dep/sdio_intf.c | 2 +-
4 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
index aad86570b59c..7150d54d49ab 100644
--- a/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
+++ b/drivers/staging/rtl8723bs/hal/HalBtcOutSrc.h
@@ -532,7 +532,6 @@ typedef struct _BTC_COEXIST {
extern BTC_COEXIST GLBtCoexist;
-u8 EXhalbtcoutsrc_InitlizeVariables(void *Adapter);
void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist);
void EXhalbtcoutsrc_InitHwConfig(PBTC_COEXIST pBtCoexist, u8 bWifiOnly);
void EXhalbtcoutsrc_InitCoexDm(PBTC_COEXIST pBtCoexist);
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index d2147a65c1cd..19486f0e0ead 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -957,9 +957,13 @@ static u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)
return true;
}
-u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
+void hal_btcoex_Initialize(void *padapter)
{
- PBTC_COEXIST pBtCoexist = &GLBtCoexist;
+ PBTC_COEXIST pBtCoexist;
+
+ memset(&GLBtCoexist, 0, sizeof(GLBtCoexist));
+
+ pBtCoexist = &GLBtCoexist;
/* pBtCoexist->statistics.cntBind++; */
@@ -999,8 +1003,6 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
GLBtcWiFiInScanState = false;
GLBtcWiFiInIQKState = false;
-
- return true;
}
void EXhalbtcoutsrc_PowerOnSetting(PBTC_COEXIST pBtCoexist)
@@ -1382,12 +1384,6 @@ void hal_btcoex_SetSingleAntPath(struct adapter *padapter, u8 singleAntPath)
EXhalbtcoutsrc_SetSingleAntPath(singleAntPath);
}
-u8 hal_btcoex_Initialize(struct adapter *padapter)
-{
- memset(&GLBtCoexist, 0, sizeof(GLBtCoexist));
- return EXhalbtcoutsrc_InitlizeVariables((void *)padapter);
-}
-
void hal_btcoex_PowerOnSetting(struct adapter *padapter)
{
EXhalbtcoutsrc_PowerOnSetting(&GLBtCoexist);
diff --git a/drivers/staging/rtl8723bs/include/hal_btcoex.h b/drivers/staging/rtl8723bs/include/hal_btcoex.h
index a0b502c34a25..eb03813fdcb9 100644
--- a/drivers/staging/rtl8723bs/include/hal_btcoex.h
+++ b/drivers/staging/rtl8723bs/include/hal_btcoex.h
@@ -28,7 +28,7 @@ void hal_btcoex_SetChipType(struct adapter *padapter, u8 chipType);
void hal_btcoex_SetPgAntNum(struct adapter *padapter, u8 antNum);
void hal_btcoex_SetSingleAntPath(struct adapter *padapter, u8 singleAntPath);
-u8 hal_btcoex_Initialize(struct adapter *padapter);
+void hal_btcoex_Initialize(void *padapter);
void hal_btcoex_PowerOnSetting(struct adapter *padapter);
void hal_btcoex_InitHwConfig(struct adapter *padapter, u8 bWifiOnly);
diff --git a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
index 540a7eed621d..65ffb807eda2 100644
--- a/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
+++ b/drivers/staging/rtl8723bs/os_dep/sdio_intf.c
@@ -371,7 +371,7 @@ static struct adapter *rtw_sdio_if1_init(struct dvobj_priv *dvobj, const struct
rtw_hal_chip_configure(padapter);
- hal_btcoex_Initialize(padapter);
+ hal_btcoex_Initialize((void *) padapter);
/* 3 6. read efuse/eeprom data */
rtw_hal_read_chip_info(padapter);
--
2.19.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-02 6:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-02 6:24 [PATCH 1/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtExist() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 2/4] staging: rtl8723bs: Change return type of hal_btcoex_IsBtControlLps() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 3/4] staging: rtl8723bs: Change return type of hal_btcoex_IsLpsOn() Nishka Dasgupta
2019-08-02 6:24 ` [PATCH 4/4] staging: rtl8723bs: Replace hal_btcoex_Initialize() Nishka Dasgupta
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.