2015-07-07 01:53:54

by Sreenath Madasu

[permalink] [raw]
Subject: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

When the checkpatch.pl script was run, it showed lines with length
more than 80 characters in rtw_ap.c file. Fixed line number 382 by
breaking it up into two lines within 80 characters.

Signed-off-by: Sreenath Madasu <[email protected]>
---
drivers/staging/rtl8188eu/core/rtw_ap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c
index 581af88..293510e 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ap.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
@@ -379,7 +379,8 @@ void expire_timeout_chk(struct adapter *padapter)
if (pmlmeext->active_keep_alive_check) {
int stainfo_offset;

- stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
+ stainfo_offset =
+ rtw_stainfo_offset(pstapriv, psta);
if (stainfo_offset_valid(stainfo_offset))
chk_alive_list[chk_alive_num++] = stainfo_offset;
continue;
--
2.3.6


2015-07-07 04:05:00

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

On Mon, Jul 06, 2015 at 09:53:26PM -0400, Sreenath Madasu wrote:
> When the checkpatch.pl script was run, it showed lines with length
> more than 80 characters in rtw_ap.c file. Fixed line number 382 by
> breaking it up into two lines within 80 characters.
>
> Signed-off-by: Sreenath Madasu <[email protected]>
> ---
> drivers/staging/rtl8188eu/core/rtw_ap.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

Any reason why you didn't cc: the maintainer of the staging subsystem
for this? Please use scripts/get_maintainer to determine who to send
stuff to.

Also, can you fix up the Subject line to show the subsystem and driver
you are modifying?

Can you fix that up and resend?

thanks,

greg k-h

2015-07-07 19:33:14

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

On Mon, 06 Jul 2015 21:53:26 -0400, Sreenath Madasu said:
> When the checkpatch.pl script was run, it showed lines with length
> more than 80 characters in rtw_ap.c file. Fixed line number 382 by
> breaking it up into two lines within 80 characters.


> - stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
> + stainfo_offset =
> + rtw_stainfo_offset(pstapriv, psta);
> if (stainfo_offset_valid(stainfo_offset))
> chk_alive_list[chk_alive_num++] = stainfo_offset;

Umm... Sreenath?

There's 97 more occurrences of the same problem in that file.

All: Is it time to kill that checkpatch test, or hide it behind a non-default
flag, to prevent code churn?


Attachments:
(No filename) (848.00 B)

2015-07-07 20:38:58

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

On Tue, 2015-07-07 at 15:32 -0400, [email protected] wrote:
> All: Is it time to kill that checkpatch test, or hide it behind a non-default
> flag, to prevent code churn?

<shrug> I'm not an 80 column zealot.

This is for staging isn't it?
Code churn there is expected and somewhat desired.

A lot of time, code churn can be useful when it
reduces the indentation depth.

For instance, this code could use continue more.

The longest line in this file is 158 chars, that's
probably excessive, awk shows 35 lines > 80 chars.

staging rtl files have a couple hundred lines > 132
and thousands of lines > 80.

2015-07-08 01:08:36

by Sreenath Madasu

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

The kernelnewbies.org guide said "For your first patch, only pick one
warning". That is the reason why I fixed one warning.

Thanks
Sreenath
On Tue, Jul 07, 2015 at 03:32:50PM -0400, [email protected] wrote:
> On Mon, 06 Jul 2015 21:53:26 -0400, Sreenath Madasu said:
> > When the checkpatch.pl script was run, it showed lines with length
> > more than 80 characters in rtw_ap.c file. Fixed line number 382 by
> > breaking it up into two lines within 80 characters.
>
>
> > - stainfo_offset = rtw_stainfo_offset(pstapriv, psta);
> > + stainfo_offset =
> > + rtw_stainfo_offset(pstapriv, psta);
> > if (stainfo_offset_valid(stainfo_offset))
> > chk_alive_list[chk_alive_num++] = stainfo_offset;
>
> Umm... Sreenath?
>
> There's 97 more occurrences of the same problem in that file.
>
> All: Is it time to kill that checkpatch test, or hide it behind a non-default
> flag, to prevent code churn?
>

2015-07-08 02:06:53

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

On Tue, 07 Jul 2015 21:08:10 -0400, Sreenath Madasu said:
> The kernelnewbies.org guide said "For your first patch, only pick one
> warning". That is the reason why I fixed one warning.

They mean "don't fix lines over 80 characters *and* missing-blank
warnings in the same patch".


Attachments:
(No filename) (848.00 B)

2015-07-08 02:08:34

by Valdis Klētnieks

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

On Tue, 07 Jul 2015 13:38:47 -0700, Joe Perches said:

> The longest line in this file is 158 chars, that's
> probably excessive, awk shows 35 lines > 80 chars.

That doesn't count tabs. Checkpatch throws 98 warnings.


Attachments:
(No filename) (848.00 B)

2015-07-08 02:54:00

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] Warnings : Fixed 80 character length warning in rtw_ap.c

On Tue, 2015-07-07 at 22:08 -0400, [email protected] wrote:
> On Tue, 07 Jul 2015 13:38:47 -0700, Joe Perches said:
>
> > The longest line in this file is 158 chars, that's
> > probably excessive, awk shows 35 lines > 80 chars.
>
> That doesn't count tabs. Checkpatch throws 98 warnings.

Yup, forgot the expand.