Skip to contentSkip to conversation

Warnings : Fixed 80 character length warning in rtw_ap.c

PATCH In review Sreenath Madasu 4 participants 8 messages Jul 7, 2015 – Jul 8, 2015 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/staging/rtl8188eu/core/rtw_ap.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/staging/rtl8188eu/core/rtw_ap.c +2 -1
index 581af88..293510e 100644
@@ -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;
Signature · 1 line
2.3.6
#1 lore raw
Quoted 8 lines · Sreenath Madasu

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.

---
 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

#2 lore raw
In reply to Sreenath Madasu

drivers/staging/rtl8188eu/core/rtw_ap.c void expire_timeout_chk(struct adapter *padapter) · line 385

Quoted 10 lines · Sreenath Madasu

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.

drivers/staging/rtl8188eu/core/rtw_ap.c +2 -1
-				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?

#3 lore raw
Quoted 2 lines · 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.

#4 lore raw
Quoted 2 lines · Joe Perches

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.

#5 lore raw
Quoted 6 lines · On Tue, 2015-07-07 at 22:08 -0400, [email protected] wrote:
Quoted 2 lines · Joe Perches

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.

#6 lore raw
In reply to [email protected]

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

Thanks
Sreenath

Quoted 19 lines · On Tue, Jul 07, 2015 at 03:32:50PM -0400, [email protected] wrote:

drivers/staging/rtl8188eu/core/rtw_ap.c void expire_timeout_chk(struct adapter *padapter) · line 385

Quoted 10 lines · Sreenath Madasu

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.

drivers/staging/rtl8188eu/core/rtw_ap.c +2 -1
-				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?

#7 lore raw
Quoted 2 lines · Sreenath Madasu

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".