* [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis
@ 2021-04-10 1:35 Mitali Borkar
2021-04-10 2:07 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Mitali Borkar @ 2021-04-10 1:35 UTC (permalink / raw)
To: gregkh; +Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s
Matched the alignment with open parenthesis to meet linux kernel coding
style.
Reported by checkpatch.
Signed-off-by: Mitali Borkar <mitaliborkar810@gmail.com>
---
drivers/staging/rtl8192e/rtl819x_HTProc.c | 20 ++++++++++----------
drivers/staging/rtl8192e/rtl819x_TSProc.c | 18 +++++++++---------
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 0ded86da1562..12f31ba9aa13 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -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;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 1b994a57633f..65eac33aaa5b 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -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);
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis
2021-04-10 1:35 [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis Mitali Borkar
@ 2021-04-10 2:07 ` Joe Perches
2021-04-10 2:25 ` Mitali Borkar
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2021-04-10 2:07 UTC (permalink / raw)
To: Mitali Borkar, gregkh
Cc: linux-staging, linux-kernel, outreachy-kernel, mitali_s
On Sat, 2021-04-10 at 07:05 +0530, Mitali Borkar wrote:
> Matched the alignment with open parenthesis to meet linux kernel coding
> style.
> Reported by checkpatch.
[]
> diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
[]
> @@ -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))
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.
> @@ -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));
Doesn't need casts or parentheses.
memset(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHCap));
> memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
> - sizeof(pHTInfo->SelfHTInfo));
> + sizeof(pHTInfo->SelfHTInfo));
etc...
> @@ -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...
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis
2021-04-10 2:07 ` Joe Perches
@ 2021-04-10 2:25 ` Mitali Borkar
2021-04-10 2:31 ` Joe Perches
0 siblings, 1 reply; 5+ messages in thread
From: Mitali Borkar @ 2021-04-10 2:25 UTC (permalink / raw)
To: Joe Perches
Cc: gregkh, linux-staging, linux-kernel, outreachy-kernel, mitali_s
On Fri, Apr 09, 2021 at 07:07:09PM -0700, Joe Perches wrote:
> On Sat, 2021-04-10 at 07:05 +0530, Mitali Borkar wrote:
> > Matched the alignment with open parenthesis to meet linux kernel coding
> > style.
> > Reported by checkpatch.
> []
> > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> []
> > @@ -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))
>
> 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.
> 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.
>
I will look into this.
> > @@ -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));
>
> Doesn't need casts or parentheses.
>
> memset(&pHTInfo->SelfHTCap, 0, sizeof(pHTInfo->SelfHCap));
>
Ok Sir, i am on it.
> > memset((void *)(&(pHTInfo->SelfHTInfo)), 0,
> > - sizeof(pHTInfo->SelfHTInfo));
> > + sizeof(pHTInfo->SelfHTInfo));
>
> etc...
>
> > @@ -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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis
2021-04-10 2:25 ` Mitali Borkar
@ 2021-04-10 2:31 ` Joe Perches
2021-04-13 11:00 ` Mitali Borkar
0 siblings, 1 reply; 5+ messages in thread
From: Joe Perches @ 2021-04-10 2:31 UTC (permalink / raw)
To: Mitali Borkar
Cc: gregkh, linux-staging, linux-kernel, outreachy-kernel, mitali_s
On Sat, 2021-04-10 at 07:55 +0530, Mitali Borkar wrote:
> On Fri, Apr 09, 2021 at 07:07:09PM -0700, Joe Perches wrote:
> > On Sat, 2021-04-10 at 07:05 +0530, Mitali Borkar wrote:
> > > Matched the alignment with open parenthesis to meet linux kernel coding
> > > style.
> > > Reported by checkpatch.
> > []
> > > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > []
> > > @@ -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))
> >
> > 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.
This sort of change should not require an additional patch.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis
2021-04-10 2:31 ` Joe Perches
@ 2021-04-13 11:00 ` Mitali Borkar
0 siblings, 0 replies; 5+ messages in thread
From: Mitali Borkar @ 2021-04-13 11:00 UTC (permalink / raw)
To: Joe Perches
Cc: gregkh, linux-staging, linux-kernel, outreachy-kernel, mitali_s
On Fri, Apr 09, 2021 at 07:31:53PM -0700, Joe Perches wrote:
> On Sat, 2021-04-10 at 07:55 +0530, Mitali Borkar wrote:
> > On Fri, Apr 09, 2021 at 07:07:09PM -0700, Joe Perches wrote:
> > > On Sat, 2021-04-10 at 07:05 +0530, Mitali Borkar wrote:
> > > > Matched the alignment with open parenthesis to meet linux kernel coding
> > > > style.
> > > > Reported by checkpatch.
> > > []
> > > > diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
> > > []
> > > > @@ -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))
> > >
> > > 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.
>
> 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?
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-04-13 11:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-10 1:35 [PATCH 4/6] staging: rtl8192e: matched alignment with open parenthesis Mitali Borkar
2021-04-10 2:07 ` Joe Perches
2021-04-10 2:25 ` Mitali Borkar
2021-04-10 2:31 ` Joe Perches
2021-04-13 11:00 ` Mitali Borkar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).