Skip to contentSkip to conversation

Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue

PATCH Superseded Nadim Almas 3 participants 4 messages Oct 13, 2016 1 message not in the archive Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue

Fixed coding style issue

---
 drivers/staging/ks7010/eap_packet.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/ks7010/eap_packet.h +4 -2
index df7f760..90432ff 100644
@@ -58,11 +58,13 @@ struct ieee802_1x_eapol_key {
 	 * encrypt the Key field; 64-bit NTP timestamp MAY be used here
 	 */
 	unsigned char replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];
-	unsigned char key_iv[IEEE8021X_KEY_IV_LEN];	/* cryptographically random number */
+	unsigned char key_iv[IEEE8021X_KEY_IV_LEN];
+	/* cryptographically random number */
 	unsigned char key_index;	/*
 					 * key flag in the most significant bit:
 					 * 0 = broadcast (default key),
-					 * 1 = unicast (key mapping key); key index is in the
+					 * 1 = unicast (key mapping key); key
+					 * index is in the
 					 * 7 least significant bits
 					 */
 	/*
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 12 lines · Nadim Almas

Fixed coding style issue

---
 drivers/staging/ks7010/eap_packet.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/ks7010/eap_packet.h +0 -0
index df7f760..90432ff 100644

drivers/staging/ks7010/eap_packet.h struct ieee802_1x_eapol_key { · line 62

Quoted 6 lines
drivers/staging/ks7010/eap_packet.h +2 -1
@@ -58,11 +58,13 @@ struct ieee802_1x_eapol_key {
 	 * encrypt the Key field; 64-bit NTP timestamp MAY be used here
 	 */
 	unsigned char replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];
-	unsigned char key_iv[IEEE8021X_KEY_IV_LEN];	/* cryptographically random number */
+	unsigned char key_iv[IEEE8021X_KEY_IV_LEN];
+	/* cryptographically random number */

Comment below the line? That's not how you read code :(

A message that is not in the archive (sent off-list or not yet received): CANQNnfHK8g8VcGN7gzx+25bc7RfEiwcr7wN=b0qcqrLHS6Dg=A@mail.gmail.com

maintainer
#3 lore raw

Note, the mailing lists reject html email, please fix up your client.

Quoted 6 lines · Nadim Almas

But i have seen in some place where comments are below the line like in
here from "drivers/staging/ks7010/eap_packet.h"
 line number 100

Quoted 13 lines

 struct wpa_eapol_key {
unsigned char type;
unsigned short key_info;
unsigned short key_length;
unsigned char replay_counter[WPA_REPLAY_COUNTER_LEN]; unsigned char key_nonce[WPA_NONCE_LEN];
unsigned char key_iv[16];
unsigned char key_rsc[8];
unsigned char key_id[8]; /* Reserved in IEEE 802.11i/RSN */ unsigned char key_mic[16];
unsigned short key_data_length;
/* followed by key_data_length bytes of key_data */ } __packed;

Read that comment, it makes sense to be there, right? Because it describes the field after the one above it.

Thanks for proving my point :)

greg k-h

#4 lore raw
In reply to Nadim Almas
Quoted 16 lines · Nadim Almas

Fixed coding style issue

---
 drivers/staging/ks7010/eap_packet.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/staging/ks7010/eap_packet.h +0 -1
index df7f760..90432ff 100644
@@ -58,11 +58,13 @@ struct ieee802_1x_eapol_key {
 	 * encrypt the Key field; 64-bit NTP timestamp MAY be used here
 	 */
 	unsigned char replay_counter[IEEE8021X_REPLAY_COUNTER_LEN];
-	unsigned char key_iv[IEEE8021X_KEY_IV_LEN];	/* cryptographically random number */

drivers/staging/ks7010/eap_packet.h struct ieee802_1x_eapol_key { · line 69

Quoted 10 lines
drivers/staging/ks7010/eap_packet.h +4 -1
+	unsigned char key_iv[IEEE8021X_KEY_IV_LEN];
+	/* cryptographically random number */
 	unsigned char key_index;	/*
 					 * key flag in the most significant bit:
 					 * 0 = broadcast (default key),
-					 * 1 = unicast (key mapping key); key index is in the
+					 * 1 = unicast (key mapping key); key
+					 * index is in the
 					 * 7 least significant bits
 

Might be better as
unsigned char key_index; /* Key flag:
* Most significant bit:
* 0: broadcast (default key)
* 1: unicast (key mapping key)
* key index is the value of
* the 7 least significant bits
*/