staging: rtl8192e: matched alignment with open parenthesis
PATCH 4/6 staging: rtl8192e: matched alignment with open parenthesis
Matched the alignment with open parenthesis to meet linux kernel coding style.
Reported by checkpatch.
--- drivers/staging/rtl8192e/rtl819x_HTProc.c | 20 ++++++++++---------- drivers/staging/rtl8192e/rtl819x_TSProc.c | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +10 -10
@@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) (net->ralink_cap_exist)) retValue = true; else if (!memcmp(net->bssid, UNKNOWN_BORADCOM, 3) || - !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || + !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || !memcmp(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) || (net->broadcom_cap_exist)) retValue = true;
@@ -547,7 +547,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee) pPeerHTCap, sizeof(struct ht_capab_ele));#endif HTSetConnectBwMode (ieee, (enum ht_channel_width )(pPeerHTCap->ChlWidth), - (enum ht_extchnl_offset )(pPeerHTInfo->ExtChlOffset)); + (enum ht_extchnl_offset )(pPeerHTInfo->ExtChlOffset)); pHTInfo->bCurTxBW40MHz = ((pPeerHTInfo->RecommemdedTxWidth ==1 ) ? true : false);
@@ -574,9 +574,9 @@ void HTOnAssocRsp(struct rtllib_device *ieee) pHTInfo->bCurrentAMPDUEnable = pHTInfo->bAMPDUEnable;if (ieee->rtllib_ap_sec_type && - (ieee->rtllib_ap_sec_type (ieee) & (SEC_ALG_WEP |SEC_ALG_TKIP ))) { + (ieee->rtllib_ap_sec_type (ieee) & (SEC_ALG_WEP |SEC_ALG_TKIP ))) {if ((pHTInfo->IOTPeer ==HT_IOT_PEER_ATHEROS ) || - (pHTInfo->IOTPeer ==HT_IOT_PEER_UNKNOWN )) + (pHTInfo->IOTPeer ==HT_IOT_PEER_UNKNOWN )) pHTInfo->bCurrentAMPDUEnable = false; }
@@ -626,7 +626,7 @@ void HTOnAssocRsp(struct rtllib_device *ieee)else pMcsFilter =MCS_FILTER_ALL ; ieee->HTHighestOperaRate =HTGetHighestMCSRate (ieee, - ieee->dot11HTOperationalRateSet, pMcsFilter); + ieee->dot11HTOperationalRateSet, pMcsFilter); ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate; pHTInfo->CurrentOpMode = pPeerHTInfo->OptMode;
@@ -654,13 +654,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee) pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;memset ((void *)(&(pHTInfo->SelfHTCap)),0 , -sizeof (pHTInfo->SelfHTCap)); +sizeof (pHTInfo->SelfHTCap));memset ((void *)(&(pHTInfo->SelfHTInfo)),0 , -sizeof (pHTInfo->SelfHTInfo)); +sizeof (pHTInfo->SelfHTInfo));memset ((void *)(&(pHTInfo->PeerHTCapBuf)),0 , -sizeof (pHTInfo->PeerHTCapBuf)); +sizeof (pHTInfo->PeerHTCapBuf));memset ((void *)(&(pHTInfo->PeerHTInfoBuf)),0 , -sizeof (pHTInfo->PeerHTInfoBuf)); +sizeof (pHTInfo->PeerHTInfoBuf)); pHTInfo->bSwBwInProgress = false;
@@ -815,7 +815,7 @@ void HTUseDefaultSetting(struct rtllib_device *ieee)HTFilterMCSRate (ieee, ieee->Regdot11TxHTOperationalRateSet, ieee->dot11HTOperationalRateSet); ieee->HTHighestOperaRate =HTGetHighestMCSRate (ieee, - ieee->dot11HTOperationalRateSet, + ieee->dot11HTOperationalRateSet,MCS_FILTER_ALL ); ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate;
drivers/staging/rtl8192e/rtl819x_TSProc.c +9 -9
@@ -34,7 +34,7 @@ static void RxPktPendingTimeout(struct timer_list *t)while (!list_empty (&pRxTs->rx_pending_pkt_list)) { pReorderEntry = (struct rx_reorder_entry *)list_entry (pRxTs->rx_pending_pkt_list.prev, - struct rx_reorder_entry, List); + struct rx_reorder_entry, List);if (index ==0 ) pRxTs->rx_indicate_seq = pReorderEntry->SeqNum;
@@ -45,7 +45,7 @@ static void RxPktPendingTimeout(struct timer_list *t)list_del_init (&pReorderEntry->List);if (SN_EQUAL (pReorderEntry->SeqNum, - pRxTs->rx_indicate_seq)) + pRxTs->rx_indicate_seq)) pRxTs->rx_indicate_seq = (pRxTs->rx_indicate_seq +1 ) %4096 ;
@@ -158,7 +158,7 @@ void TSInitialize(struct rtllib_device *ieee)ResetTxTsEntry (pTxTS);list_add_tail (&pTxTS->TsCommonInfo.List, - &ieee->Tx_TS_Unused_List); + &ieee->Tx_TS_Unused_List); pTxTS++; }
@@ -276,7 +276,7 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,if (pTSPEC !=NULL )memcpy ((u8 *)(&(pTsCommonInfo->TSpec)), (u8 *)pTSPEC, -sizeof (union tspec_body )); +sizeof (union tspec_body ));for (count =0 ; count < TCLAS_Num; count++) memcpy((u8 *)(&(pTsCommonInfo->TClass[count])),
@@ -355,14 +355,14 @@ bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,if (TxRxSelect ==TX_DIR ) {struct tx_ts_record *tmp =container_of (*ppTS, - struct tx_ts_record, - TsCommonInfo); + struct tx_ts_record, + TsCommonInfo);ResetTxTsEntry (tmp); }else {struct rx_ts_record *tmp =container_of (*ppTS, - struct rx_ts_record, - ts_common_info); + struct rx_ts_record, + ts_common_info);ResetRxTsEntry (tmp); }
@@ -409,7 +409,7 @@ static void RemoveTsEntry(struct rtllib_device *ieee,while (!list_empty (&pRxTS->rx_pending_pkt_list)) { pRxReorderEntry = (struct rx_reorder_entry *)list_entry (pRxTS->rx_pending_pkt_list.prev, - struct rx_reorder_entry, List); + struct rx_reorder_entry, List);netdev_dbg (ieee->dev,"%s(): Delete SeqNum %d!\n" , __func__, pRxReorderEntry->SeqNum);list_del_init (&pRxReorderEntry->List);
Signature · 1 line
2.30.2
Quoted 3 lines · Mitali Borkar
Matched the alignment with open parenthesis to meet linux kernel coding style.
Reported by checkpatch.
[]
drivers/staging/rtl8192e/rtl819x_HTProc.c
Quoted 1 line
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0
[]
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) � (net->ralink_cap_exist)) � retValue = true;� else if (!memcmp(net->bssid,
UNKNOWN_BORADCOM, 3) ||drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || + !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||� !memcmp(net->bssid,
LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
� (net->broadcom_cap_exist))
checkpatch is a stupid script.
Look further at the code not just at what checkpatch reports. Align all the contination lines, not just the first one.
It might be sensible to add a generic function like
static inline bool ether_oui_equal(const u8 *addr, const u8 *oui)
{
return addr[0] == oui[0] && addr[1] == oui[1] && addr[2] == oui[2];
} to include/linux/etherdevice.h
(Maybe use & instead of && if it's speed sensitive)
so this would read
else if (ether_oui_equal(net->bssid, UNKNOWN_BORADCOM) || ether_oui_equal(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM) || ether_oui_equal(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM) || net->broacom_cap_exist)
and it'd also be good to correct the typo of UNKNOWN_BORADCOM globally.
drivers/staging/rtl8192e/rtl819x_HTProc.c void HTInitializeHTInfo(struct rtllib_device *ieee) · line 657
Quoted 7 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -654,13 +654,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee) � pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;�
� memset((void *)(&(pHTInfo->SelfHTCap)), 0,
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- sizeof(pHTInfo->SelfHTCap)); + sizeof(pHTInfo->SelfHTCap));
Doesn't need casts or parentheses.
memset(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHCap));
drivers/staging/rtl8192e/rtl819x_HTProc.c void HTInitializeHTInfo(struct rtllib_device *ieee) · line 659
Quoted 3 lines
� memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- sizeof(pHTInfo->SelfHTInfo)); + sizeof(pHTInfo->SelfHTInfo));
etc...
drivers/staging/rtl8192e/rtl819x_HTProc.c void HTUseDefaultSetting(struct rtllib_device *ieee) · line 819
Quoted 7 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1@@ -815,7 +815,7 @@ void HTUseDefaultSetting(struct rtllib_device *ieee) � HTFilterMCSRate(ieee, ieee->Regdot11TxHTOperationalRateSet, � ieee->dot11HTOperationalRateSet); � ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, - ieee->dot11HTOperationalRateSet, + ieee->dot11HTOperationalRateSet, � MCS_FILTER_ALL);
multi line statement alignment etc...
Quoted 7 lines · Joe Perches
Quoted 3 lines · Mitali Borkar
Matched the alignment with open parenthesis to meet linux kernel coding style.
Reported by checkpatch.[]
drivers/staging/rtl8192e/rtl819x_HTProc.c
Quoted 1 line
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0[]
Quoted 13 lines
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) (net->ralink_cap_exist)) retValue = true;else if (!memcmp(net->bssid,
UNKNOWN_BORADCOM, 3) ||drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || + !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||!memcmp(net->bssid,
LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) || (net->broadcom_cap_exist))checkpatch is a stupid script.
Look further at the code not just at what checkpatch reports. Align all the contination lines, not just the first one.
Sir, I have aligned them in last patch of this patchset.
Quoted 11 lines
It might be sensible to add a generic function like
static inline bool
ether_oui_equal(const u8 *addr, const u8 *oui){ return addr[0] == oui[0] && addr[1] == oui[1] && addr[2] == oui[2]; }to
include/linux/etherdevice.h(Maybe use & instead of && if it's speed sensitive)
Quoted 9 lines
so this would read
else if (ether_oui_equal(net->bssid, UNKNOWN_BORADCOM) || ether_oui_equal(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM) || ether_oui_equal(net->bssid, LINKSYSWRT350_LINKSYSWRT150_BROADCOM) || net->broacom_cap_exist)and it'd also be good to correct the typo of
UNKNOWN_BORADCOMglobally.
I will look into this.
Quoted 4 lines
Quoted 4 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -654,13 +654,13 @@ void HTInitializeHTInfo(struct rtllib_device *ieee) pHTInfo->CurrentAMPDUFactor = pHTInfo->AMPDU_Factor;
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c void HTInitializeHTInfo(struct rtllib_device *ieee) · line 657
Quoted 3 lines
memset((void *)(&(pHTInfo->SelfHTCap)), 0,
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- sizeof(pHTInfo->SelfHTCap)); + sizeof(pHTInfo->SelfHTCap));Doesn't need casts or parentheses.
memset(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHCap));
Ok Sir, i am on it.
Quoted 6 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c void HTInitializeHTInfo(struct rtllib_device *ieee) · line 659
Quoted 3 lines
memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- sizeof(pHTInfo->SelfHTInfo)); + sizeof(pHTInfo->SelfHTInfo));etc...
Quoted 10 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c void HTUseDefaultSetting(struct rtllib_device *ieee) · line 819
Quoted 7 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1@@ -815,7 +815,7 @@ void HTUseDefaultSetting(struct rtllib_device *ieee) HTFilterMCSRate(ieee, ieee->Regdot11TxHTOperationalRateSet, ieee->dot11HTOperationalRateSet); ieee->HTHighestOperaRate = HTGetHighestMCSRate(ieee, - ieee->dot11HTOperationalRateSet, + ieee->dot11HTOperationalRateSet, MCS_FILTER_ALL);multi line statement alignment etc...
Sir, I have aligned this patch 6/6
Quoted 1 line
Quoted 21 lines · Mitali Borkar
Quoted 7 lines · Joe Perches
Quoted 3 lines · Mitali Borkar
Matched the alignment with open parenthesis to meet linux kernel coding style.
Reported by checkpatch.[]
drivers/staging/rtl8192e/rtl819x_HTProc.c
Quoted 1 line
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0[]
Quoted 13 lines
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) � (net->ralink_cap_exist)) � retValue = true;� else if (!memcmp(net->bssid,
UNKNOWN_BORADCOM, 3) ||drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || + !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||� !memcmp(net->bssid,
LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) ||
� (net->broadcom_cap_exist))checkpatch is a stupid script.
Look further at the code not just at what checkpatch reports. Align all the contination lines, not just the first one.
Quoted 1 line
Sir, I have aligned them in last patch of this patchset.
This sort of change should not require an additional patch.
Quoted 22 lines · Joe Perches
Quoted 21 lines · Mitali Borkar
Quoted 20 lines · Joe Perches
Quoted 3 lines · Mitali Borkar
Matched the alignment with open parenthesis to meet linux kernel coding style.
Reported by checkpatch.[]
drivers/staging/rtl8192e/rtl819x_HTProc.c
Quoted 1 line
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0[]
Quoted 8 lines
drivers/staging/rtl8192e/rtl819x_HTProc.c +0
-0@@ -154,7 +154,7 @@ bool IsHTHalfNmodeAPs(struct rtllib_device *ieee) (net->ralink_cap_exist)) retValue = true;else if (!memcmp(net->bssid,
UNKNOWN_BORADCOM, 3) ||drivers/staging/rtl8192e/rtl819x_HTProc.c +1
-1- !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) || + !memcmp(net->bssid, LINKSYSWRT330_LINKSYSWRT300_BROADCOM, 3) ||!memcmp(net->bssid,
LINKSYSWRT350_LINKSYSWRT150_BROADCOM, 3) || (net->broadcom_cap_exist))checkpatch is a stupid script.
Look further at the code not just at what checkpatch reports. Align all the contination lines, not just the first one.
Quoted 4 lines
Quoted 1 line
Sir, I have aligned them in last patch of this patchset.
This sort of change should not require an additional patch.
So now should I compile this as a patchset of 5, removing the last patch of alignment?