Staging: rtl8723bs: hal_btcoex: fixed styling issues
PATCH 1/1 Staging: rtl8723bs: hal_btcoex: fixed styling issues
Fixed various checkpatch.pl styling issues: spaces before tabs, constants being on left side of comparisons, unnecessary braces, etc.
--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 78 +++++++++++----------- 1 file changed, 40 insertions(+), 38 deletions(-)
drivers/staging/rtl8723bs/hal/hal_btcoex.c +40 -38
@@ -10,14 +10,14 @@#include <hal_btcoex.h> #include <Mp_Precomp.h> -/* Global variables */ +/* Global variables */ struct btc_coexist GLBtCoexist;static u8 GLBtcWiFiInScanState;static u8 GLBtcWiFiInIQKState;/* */ -/* Debug related function */ +/* Debug related function */ /* */ static u8 halbtcoutsrc_IsBtCoexistAvailable (struct btc_coexist *pBtCoexist) {
@@ -92,7 +92,7 @@ static void halbtcoutsrc_LeaveLowPower(struct btc_coexist *pBtCoexist) stime = jiffies; do { ready = rtw_register_task_alive(padapter, BTCOEX_ALIVE); - if (_SUCCESS == ready) + if (ready == _SUCCESS) break; utime = jiffies_to_msecs(jiffies - stime);
@@ -304,8 +304,10 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)break ;case BTC_GET_BL_WIFI_SCAN : -/* Use the value of the new variable GLBtcWiFiInScanState to judge whether WiFi is in scan state or not, since the originally used flag -WIFI_SITE_MONITOR in fwstate may not be cleared in time */ +/* +* Use the value of the new variable GLBtcWiFiInScanState to judge whether WiFi is in scan state or not, since the originally used flag +* WIFI_SITE_MONITOR in fwstate may not be cleared in time +*/ *pu8 = GLBtcWiFiInScanState;break ;
@@ -365,6 +367,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)case BTC_GET_U4_WIFI_TRAFFIC_DIRECTION : {struct rt_link_detect_t *plinkinfo; + plinkinfo = &padapter->mlmepriv.LinkDetectInfo;if (plinkinfo->NumTxOkInPeriod > plinkinfo->NumRxOkInPeriod)
@@ -402,9 +405,9 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf)case BTC_GET_U1_MAC_PHY_MODE : *pu8 =BTC_SMSP ; -/* *pU1Tmp = BTC_DMSP; */ -/* *pU1Tmp = BTC_DMDP; */ -/* *pU1Tmp = BTC_MP_UNKNOWN; */ +/* *pU1Tmp = BTC_DMSP; */ +/* *pU1Tmp = BTC_DMDP; */ +/* *pU1Tmp = BTC_MP_UNKNOWN; */ break ;case BTC_GET_U1_AP_NUM :
@@ -562,7 +565,7 @@ static u8 halbtcoutsrc_Set(void *pBtcContext, u8 setType, void *pInBuf) }/* */ -/* IO related function */ +/* IO related function */ /* */ static u8 halbtcoutsrc_Read1Byte (void *pBtcContext,u32 RegAddr) {
@@ -669,7 +672,7 @@ static void halbtcoutsrc_WriteLocalReg1Byte(void *pBtcContext, u32 RegAddr, u8 Dstruct btc_coexist *pBtCoexist = (struct btc_coexist *)pBtcContext;struct adapter *Adapter = pBtCoexist->Adapter; -if (BTC_INTF_SDIO == pBtCoexist->chipInterface) +if (pBtCoexist->chipInterface ==BTC_INTF_SDIO )rtw_write8 (Adapter,SDIO_LOCAL_BASE | RegAddr, Data);else rtw_write8 (Adapter, RegAddr, Data);
@@ -773,7 +776,7 @@ static void halbtcoutsrc_FillH2cCmd(void *pBtcContext, u8 elementId, u32 cmdLen, }/* */ -/* Extern functions called by other module */ +/* Extern functions called by other module */ /* */ static u8 EXhalbtcoutsrc_BindBtCoexWithAdapter (void *padapter) {
@@ -781,8 +784,8 @@ static u8 EXhalbtcoutsrc_BindBtCoexWithAdapter(void *padapter)if (pBtCoexist->bBinded)return false; -else - pBtCoexist->bBinded = true; + + pBtCoexist->bBinded = true; pBtCoexist->statistics.cntBind++;
@@ -895,20 +898,20 @@ void EXhalbtcoutsrc_IpsNotify(struct btc_coexist *pBtCoexist, u8 type)if (pBtCoexist->bManualControl)return ; -if (IPS_NONE == type) +if (type ==IPS_NONE ) ipsType =BTC_IPS_LEAVE ;else ipsType =BTC_IPS_ENTER ;/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_IpsNotify (pBtCoexist, ipsType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_IpsNotify (pBtCoexist, ipsType); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_LpsNotify (struct btc_coexist *pBtCoexist,u8 type)
@@ -923,7 +926,7 @@ void EXhalbtcoutsrc_LpsNotify(struct btc_coexist *pBtCoexist, u8 type)if (pBtCoexist->bManualControl)return ; -if (PS_MODE_ACTIVE == type) +if (type ==PS_MODE_ACTIVE ) lpsType =BTC_LPS_DISABLE ;else lpsType =BTC_LPS_ENABLE ;
@@ -953,14 +956,14 @@ void EXhalbtcoutsrc_ScanNotify(struct btc_coexist *pBtCoexist, u8 type) }/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_ScanNotify (pBtCoexist, scanType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_ScanNotify (pBtCoexist, scanType); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_ConnectNotify (struct btc_coexist *pBtCoexist,u8 action)
@@ -979,14 +982,14 @@ void EXhalbtcoutsrc_ConnectNotify(struct btc_coexist *pBtCoexist, u8 action) assoType =BTC_ASSOCIATE_FINISH ;/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_ConnectNotify (pBtCoexist, assoType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_ConnectNotify (pBtCoexist, assoType); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ } void EXhalbtcoutsrc_MediaStatusNotify(struct btc_coexist *pBtCoexist, enum
@@ -1001,20 +1004,20 @@ void EXhalbtcoutsrc_MediaStatusNotify(struct btc_coexist *pBtCoexist, enumif (pBtCoexist->bManualControl)return ; -if (RT_MEDIA_CONNECT == mediaStatus) +if (mediaStatus ==RT_MEDIA_CONNECT ) mStatus =BTC_MEDIA_CONNECT ;else mStatus =BTC_MEDIA_DISCONNECT ;/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_MediaStatusNotify (pBtCoexist, mStatus);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_MediaStatusNotify (pBtCoexist, mStatus); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_SpecialPacketNotify (struct btc_coexist *pBtCoexist,u8 pktType)
@@ -1027,25 +1030,24 @@ void EXhalbtcoutsrc_SpecialPacketNotify(struct btc_coexist *pBtCoexist, u8 pktTyif (pBtCoexist->bManualControl)return ; -if (PACKET_DHCP == pktType) { +if (pktType ==PACKET_DHCP ) packetType =BTC_PACKET_DHCP ; - }else if (PACKET_EAPOL == pktType) { +else if (pktType ==PACKET_EAPOL ) packetType =BTC_PACKET_EAPOL ; - }else if (PACKET_ARP == pktType) { +else if (pktType ==PACKET_ARP ) packetType =BTC_PACKET_ARP ; - }else { +else return ; - }/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_SpecialPacketNotify (pBtCoexist, packetType);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_SpecialPacketNotify (pBtCoexist, packetType); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_BtInfoNotify (struct btc_coexist *pBtCoexist,u8 *tmpBuf,u8 length)
@@ -1056,14 +1058,14 @@ void EXhalbtcoutsrc_BtInfoNotify(struct btc_coexist *pBtCoexist, u8 *tmpBuf, u8 pBtCoexist->statistics.cntBtInfoNotify++;/* All notify is called in cmd thread, don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_BtInfoNotify (pBtCoexist, tmpBuf, length);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_BtInfoNotify (pBtCoexist, tmpBuf, length); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_HaltNotify (struct btc_coexist *pBtCoexist)
@@ -1103,25 +1105,25 @@ void EXhalbtcoutsrc_Periodical(struct btc_coexist *pBtCoexist)/* Periodical should be called in cmd thread, */ /* don't need to leave low power again */ -/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ +/* halbtcoutsrc_LeaveLowPower(pBtCoexist); */ if (pBtCoexist->boardInfo.btdmAntNum ==2 )EXhalbtc8723b2ant_Periodical (pBtCoexist);else if (pBtCoexist->boardInfo.btdmAntNum ==1 )EXhalbtc8723b1ant_Periodical (pBtCoexist); -/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ +/* halbtcoutsrc_NormalLowPower(pBtCoexist); */ }void EXhalbtcoutsrc_SetAntNum (u8 type,u8 antNum) { -if (BT_COEX_ANT_TYPE_PG == type) { +if (type ==BT_COEX_ANT_TYPE_PG ) { GLBtCoexist.boardInfo.pgAntNum = antNum; GLBtCoexist.boardInfo.btdmAntNum = antNum; - }else if (BT_COEX_ANT_TYPE_ANTDIV == type) { + }else if (type ==BT_COEX_ANT_TYPE_ANTDIV ) { GLBtCoexist.boardInfo.btdmAntNum = antNum;/* GLBtCoexist.boardInfo.btdmAntPos = BTC_ANTENNA_AT_MAIN_PORT; */ - }else if (BT_COEX_ANT_TYPE_DETECTED == type) { + }else if (type ==BT_COEX_ANT_TYPE_DETECTED ) { GLBtCoexist.boardInfo.btdmAntNum = antNum;/* GLBtCoexist.boardInfo.btdmAntPos = BTC_ANTENNA_AT_MAIN_PORT; */ }
Signature · 1 line
2.43.2
Greg KH
maintainerQuoted 6 lines · Michael Harris
Fixed various checkpatch.pl styling issues: spaces before tabs, constants being on left side of comparisons, unnecessary braces, etc.
Signed-off-by Michael Harris <[email protected]>--- drivers/staging/rtl8723bs/hal/hal_btcoex.c | 78 +++++++++++----------- 1 file changed, 40 insertions(+), 38 deletions(-)
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him a patch that has triggered this response. He used to manually respond to these common problems, but in order to save his sanity (he kept writing the same thing over and over, yet to different people), I was created. Hopefully you will not take offence and will fix the problem in your patch and resubmit it so that it can be accepted into the Linux kernel tree.
You are receiving this message because of the following common error(s) as indicated below:
- Your patch did many different things all at once, making it difficult to review. All Linux kernel patches need to only do one thing at a time. If you need to do multiple things (such as clean up all coding style issues in a file/driver), do it in a sequence of patches, each one doing only one thing. This will make it easier to review the patches to ensure that they are correct, and to help alleviate any merge issues that larger patches can cause.
If you wish to discuss this problem further, or you have questions about how to resolve this issue, please feel free to respond to this email and Greg will reply once he has dug out from the pending patches received from other developers.
thanks,
greg k-h's patch email bot
Quoted 3 lines · Michael Harris
Fixed various checkpatch.pl styling issues: spaces before tabs, constants being on left side of comparisons, unnecessary braces, etc.
Signed-off-by Michael Harris <[email protected]>
Please run checkpatch.pl on your patches.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#12:
Fixed various checkpatch.pl styling issues: spaces before tabs, constants being on left side of comparisons, unnecessary braces, etc.
regards,
dan carpenter
Quoted 6 lines · Dan Carpenter
Quoted 3 lines · Michael Harris
Fixed various checkpatch.pl styling issues: spaces before tabs, constants being on left side of comparisons, unnecessary braces, etc.
Signed-off-by Michael Harris <[email protected]>
Quoted 9 lines
Please run checkpatch.pl on your patches.
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#12:
Fixed various checkpatch.pl styling issues: spaces before tabs, constants being on left side of comparisons, unnecessary braces, etc.regards,
dan carpenter
Thank you for letting me know.
I will break down my patch into a sequence of patches and run checkpatch.pl on it before resubmitting.
Thanks,
Michael Harris