* [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning @ 2019-03-26 18:25 Anirudh Rayabharam 2019-03-27 6:36 ` Dan Carpenter ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Anirudh Rayabharam @ 2019-03-26 18:25 UTC (permalink / raw) To: gregkh, Larry.Finger, hadess, hdegoede; +Cc: devel, linux-kernel Shorten the expression by re-using the part that was already computed to fix the line over 80 characters warning reported by checkpatch.pl. Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com> --- drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 18fabf5ff44b..bc0230672457 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) Update_RA_Entry(padapter, psta); /* pairwise key */ /* per sta pairwise key and settings */ - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { + if ((psecuritypriv->dot11PrivacyAlgrthm == _TKIP_) || + (psecuritypriv->dot11PrivacyAlgrthm == _AES_)) { rtw_setstakey_cmd(padapter, psta, true, false); } } -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-26 18:25 [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning Anirudh Rayabharam @ 2019-03-27 6:36 ` Dan Carpenter 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam 2019-03-29 21:16 ` [PATCH] " Mukesh Ojha 2 siblings, 0 replies; 8+ messages in thread From: Dan Carpenter @ 2019-03-27 6:36 UTC (permalink / raw) To: Anirudh Rayabharam Cc: gregkh, Larry.Finger, hadess, hdegoede, devel, linux-kernel On Tue, Mar 26, 2019 at 11:55:07PM +0530, Anirudh Rayabharam wrote: > Shorten the expression by re-using the part that was already computed to This confused me. Better to phrase it like: Shorten the expression by using the "psecuritypriv" pointer. > fix the line over 80 characters warning reported by checkpatch.pl. > > Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com> > --- > drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c > index 18fabf5ff44b..bc0230672457 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) > Update_RA_Entry(padapter, psta); > /* pairwise key */ > /* per sta pairwise key and settings */ > - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || > - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { > + if ((psecuritypriv->dot11PrivacyAlgrthm == _TKIP_) || > + (psecuritypriv->dot11PrivacyAlgrthm == _AES_)) { It's better to align it slightly different as well. In the kernel we would normally align the second condition to match the first one. I probably would have gotten rid of the parenthesis as well. I don't like double parenthesis around == because I reserve that for = assignment conditions. if (psecuritypriv->dot11PrivacyAlgrthm == _TKIP_ || psecuritypriv->dot11PrivacyAlgrthm == _AES_) { rtw_setstakey_cmd(padapter, psta, true, false); When you're changing just a couple lines like this you can get away with making multiple white space changes at the same time because the One Thing that the patch does is "Clean up a Condition". There is some flexibility in the One thing Per Patch rule, but you have to sell it in the right way. The patch description would be: Checkpatch.pl complains that this line is over 80 characters. We should use the "psecuritypriv" for consistency. It's not aligned properly and there are too many parenthesis. This patch just cleans up a condition, it doesn't affect runtime. regards, dan carpenter ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-26 18:25 [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning Anirudh Rayabharam 2019-03-27 6:36 ` Dan Carpenter @ 2019-03-27 18:19 ` Anirudh Rayabharam 2019-03-28 2:07 ` Dan Carpenter ` (3 more replies) 2019-03-29 21:16 ` [PATCH] " Mukesh Ojha 2 siblings, 4 replies; 8+ messages in thread From: Anirudh Rayabharam @ 2019-03-27 18:19 UTC (permalink / raw) To: gregkh, hadess, hdegoede, Larry.Finger, dan.carpenter; +Cc: devel, linux-kernel Checkpatch.pl complains that these lines are over 80 characters. Use the "psecuritypriv" pointer for consistency, remove unnecessary parantheses and fix the alignment. This patch just cleans up a condition, it doesn't affect runtime. Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com> --- v2: Made the commit message clearer, removed unnecessary parantheses and fixed the alignment as suggested by Dan Carpenter <dan.carpenter@oracle.com> drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c index 18fabf5ff44b..8062b7f36de2 100644 --- a/drivers/staging/rtl8723bs/core/rtw_ap.c +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) Update_RA_Entry(padapter, psta); /* pairwise key */ /* per sta pairwise key and settings */ - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { + if (psecuritypriv->dot11PrivacyAlgrthm == _TKIP_ || + psecuritypriv->dot11PrivacyAlgrthm == _AES_) { rtw_setstakey_cmd(padapter, psta, true, false); } } -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam @ 2019-03-28 2:07 ` Dan Carpenter 2019-03-28 2:13 ` Joe Perches ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: Dan Carpenter @ 2019-03-28 2:07 UTC (permalink / raw) To: Anirudh Rayabharam Cc: gregkh, hadess, hdegoede, Larry.Finger, devel, linux-kernel Thanks! Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> regards, dan carpenter ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam 2019-03-28 2:07 ` Dan Carpenter @ 2019-03-28 2:13 ` Joe Perches 2019-03-29 16:13 ` Greg KH 2019-03-30 11:58 ` Anirudh Rayabharam 3 siblings, 0 replies; 8+ messages in thread From: Joe Perches @ 2019-03-28 2:13 UTC (permalink / raw) To: Anirudh Rayabharam, gregkh, hadess, hdegoede, Larry.Finger, dan.carpenter Cc: devel, linux-kernel On Wed, 2019-03-27 at 23:49 +0530, Anirudh Rayabharam wrote: > Checkpatch.pl complains that these lines are over 80 characters. Use the > "psecuritypriv" pointer for consistency, remove unnecessary parantheses > and fix the alignment. > > This patch just cleans up a condition, it doesn't affect runtime. [] > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c [] > @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) > Update_RA_Entry(padapter, psta); > /* pairwise key */ > /* per sta pairwise key and settings */ > - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || > - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { > + if (psecuritypriv->dot11PrivacyAlgrthm == _TKIP_ || > + psecuritypriv->dot11PrivacyAlgrthm == _AES_) { > rtw_setstakey_cmd(padapter, psta, true, false); > } You could remove the unnecessary {} braces here too ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam 2019-03-28 2:07 ` Dan Carpenter 2019-03-28 2:13 ` Joe Perches @ 2019-03-29 16:13 ` Greg KH 2019-03-30 11:58 ` Anirudh Rayabharam 3 siblings, 0 replies; 8+ messages in thread From: Greg KH @ 2019-03-29 16:13 UTC (permalink / raw) To: Anirudh Rayabharam Cc: hadess, hdegoede, Larry.Finger, dan.carpenter, devel, linux-kernel On Wed, Mar 27, 2019 at 11:49:07PM +0530, Anirudh Rayabharam wrote: > Checkpatch.pl complains that these lines are over 80 characters. Use the > "psecuritypriv" pointer for consistency, remove unnecessary parantheses > and fix the alignment. > > This patch just cleans up a condition, it doesn't affect runtime. > > Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com> > Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> > --- > v2: Made the commit message clearer, removed unnecessary parantheses and fixed > the alignment as suggested by Dan Carpenter <dan.carpenter@oracle.com> > > drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c > index 18fabf5ff44b..8062b7f36de2 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) > Update_RA_Entry(padapter, psta); > /* pairwise key */ > /* per sta pairwise key and settings */ > - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || > - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { > + if (psecuritypriv->dot11PrivacyAlgrthm == _TKIP_ || > + psecuritypriv->dot11PrivacyAlgrthm == _AES_) { > rtw_setstakey_cmd(padapter, psta, true, false); > } > } Patch does not apply to my staging-next branch :( Please rebase and resend. thanks, greg k-h ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam ` (2 preceding siblings ...) 2019-03-29 16:13 ` Greg KH @ 2019-03-30 11:58 ` Anirudh Rayabharam 3 siblings, 0 replies; 8+ messages in thread From: Anirudh Rayabharam @ 2019-03-30 11:58 UTC (permalink / raw) To: gregkh, hadess, hdegoede, Larry.Finger, dan.carpenter, joe, mojha Cc: devel, linux-kernel On Wed, Mar 27, 2019 at 11:49:07PM +0530, Anirudh Rayabharam wrote: > Checkpatch.pl complains that these lines are over 80 characters. Use the > "psecuritypriv" pointer for consistency, remove unnecessary parantheses > and fix the alignment. > > This patch just cleans up a condition, it doesn't affect runtime. > > Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com> > --- > v2: Made the commit message clearer, removed unnecessary parantheses and fixed > the alignment as suggested by Dan Carpenter <dan.carpenter@oracle.com> > > drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c > index 18fabf5ff44b..8062b7f36de2 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) > Update_RA_Entry(padapter, psta); > /* pairwise key */ > /* per sta pairwise key and settings */ > - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || > - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { > + if (psecuritypriv->dot11PrivacyAlgrthm == _TKIP_ || > + psecuritypriv->dot11PrivacyAlgrthm == _AES_) { > rtw_setstakey_cmd(padapter, psta, true, false); > } > } > -- > 2.17.1 > Unfortunately, the v2 of this patch was missed and v1 was applied to Greg's staging tree. So, I am abandoning v2 of this patch. I will fix the alignment and braces issue in a new patch. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning 2019-03-26 18:25 [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning Anirudh Rayabharam 2019-03-27 6:36 ` Dan Carpenter 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam @ 2019-03-29 21:16 ` Mukesh Ojha 2 siblings, 0 replies; 8+ messages in thread From: Mukesh Ojha @ 2019-03-29 21:16 UTC (permalink / raw) To: Anirudh Rayabharam, gregkh, Larry.Finger, hadess, hdegoede Cc: devel, linux-kernel On 3/26/2019 11:55 PM, Anirudh Rayabharam wrote: > Shorten the expression by re-using the part that was already computed to > fix the line over 80 characters warning reported by checkpatch.pl. > > Signed-off-by: Anirudh Rayabharam <anirudh.rayabharam@gmail.com> > --- > drivers/staging/rtl8723bs/core/rtw_ap.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c b/drivers/staging/rtl8723bs/core/rtw_ap.c > index 18fabf5ff44b..bc0230672457 100644 > --- a/drivers/staging/rtl8723bs/core/rtw_ap.c > +++ b/drivers/staging/rtl8723bs/core/rtw_ap.c > @@ -2336,8 +2336,8 @@ void rtw_ap_restore_network(struct adapter *padapter) > Update_RA_Entry(padapter, psta); > /* pairwise key */ > /* per sta pairwise key and settings */ > - if ((padapter->securitypriv.dot11PrivacyAlgrthm == _TKIP_) || > - (padapter->securitypriv.dot11PrivacyAlgrthm == _AES_)) { > + if ((psecuritypriv->dot11PrivacyAlgrthm == _TKIP_) || > + (psecuritypriv->dot11PrivacyAlgrthm == _AES_)) { > rtw_setstakey_cmd(padapter, psta, true, false); > } Get rid of this {}.fix this . Now patch looks good after Dan comment. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Cheers, -Mukesh > } ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-03-30 11:58 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-03-26 18:25 [PATCH] staging: rtl8723bs: core: fix line over 80 characters warning Anirudh Rayabharam 2019-03-27 6:36 ` Dan Carpenter 2019-03-27 18:19 ` [PATCH v2] " Anirudh Rayabharam 2019-03-28 2:07 ` Dan Carpenter 2019-03-28 2:13 ` Joe Perches 2019-03-29 16:13 ` Greg KH 2019-03-30 11:58 ` Anirudh Rayabharam 2019-03-29 21:16 ` [PATCH] " Mukesh Ojha
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).