Skip to contentSkip to conversation

staging: rtl8712: Moved logical OR operator to previous line.

PATCH Superseded Varsha Rao 2 participants 2 messages Feb 16, 2017 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Varsha Rao

author
#0 lore raw

PATCH 1/1 staging: rtl8712: Moved logical OR operator to previous line.

Logical OR operator is moved to previous line to fix the following checkpatch issue:

CHECK: Logical continuations should be on the previous line.

---
 drivers/staging/rtl8712/ieee80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/ieee80211.c +2 -2
index d84da2b..bce78b6 100644
@@ -288,8 +288,8 @@ int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
 		/* No WPA IE - fail silently */
 		return _FAIL;
 	}
-	if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie + 1) != (u8)(wpa_ie_len - 2))
-	     || (memcmp(wpa_ie + 2, (void *)WPA_OUI_TYPE, WPA_SELECTOR_LEN)))
+	if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie + 1) != (u8)(wpa_ie_len - 2)) ||
+	    (memcmp(wpa_ie + 2, (void *)WPA_OUI_TYPE, WPA_SELECTOR_LEN)))
 		return _FAIL;
 	pos = wpa_ie;
 	pos += 8;
Signature · 1 line
2.9.3
#1 lore raw
Quoted 1 line · Varsha Rao

Logical OR operator is moved to previous line to fix the following checkpatch issue:

Commit messages should respect the 80 character limit. Actually they should be smaller, because they willbe a bit indented in the git log.

Use the imperative: Move the logical OR operator...

Quoted 13 lines

CHECK: Logical continuations should be on the previous line.

---
 drivers/staging/rtl8712/ieee80211.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8712/ieee80211.c +0 -0
index d84da2b..bce78b6 100644

drivers/staging/rtl8712/ieee80211.c int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, · line 292

Quoted 7 lines
drivers/staging/rtl8712/ieee80211.c +2 -2
@@ -288,8 +288,8 @@ int r8712_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher,
 		/* No WPA IE - fail silently */
 		return _FAIL;
 	}
-	if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie + 1) != (u8)(wpa_ie_len - 2))
-	     || (memcmp(wpa_ie + 2, (void *)WPA_OUI_TYPE, WPA_SELECTOR_LEN)))
+	if ((*wpa_ie != _WPA_IE_ID_) || (*(wpa_ie + 1) != (u8)(wpa_ie_len - 2)) ||
+	    (memcmp(wpa_ie + 2, (void *)WPA_OUI_TYPE, WPA_SELECTOR_LEN)))

The first added line appears to be now over 80 characters. One fix should not add new warnings. You can put a newline after each || in this case for better readability. Another possible solution could be to drop the unneeded parentheses.

julia

Quoted 13 lines
drivers/staging/rtl8712/ieee80211.c +0 -1
 		return _FAIL;
 	pos = wpa_ie;
 	pos += 8;
--

2.9.3

--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170216224234.GA25084%40euri.
For more options, visit https://groups.google.com/d/optout.