All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue
@ 2016-10-13 16:05 Nadim Almas
  2016-10-13 16:21 ` Greg KH
  2016-10-13 19:09 ` Joe Perches
  0 siblings, 2 replies; 4+ messages in thread
From: Nadim Almas @ 2016-10-13 16:05 UTC (permalink / raw)
  To: gregkh; +Cc: devel, linux-kernel

Fixed coding style issue

Signed-off-by: Nadim Almas <nadim.902@gmail.com>
---
 drivers/staging/ks7010/eap_packet.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h
index df7f760..90432ff 100644
--- a/drivers/staging/ks7010/eap_packet.h
+++ b/drivers/staging/ks7010/eap_packet.h
@@ -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
 					 */
 	/*
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue
  2016-10-13 16:05 [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue Nadim Almas
@ 2016-10-13 16:21 ` Greg KH
       [not found]   ` <CANQNnfHK8g8VcGN7gzx+25bc7RfEiwcr7wN=b0qcqrLHS6Dg=A@mail.gmail.com>
  2016-10-13 19:09 ` Joe Perches
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2016-10-13 16:21 UTC (permalink / raw)
  To: Nadim Almas; +Cc: devel, linux-kernel

On Thu, Oct 13, 2016 at 09:05:57AM -0700, Nadim Almas wrote:
> Fixed coding style issue
> 
> Signed-off-by: Nadim Almas <nadim.902@gmail.com>
> ---
>  drivers/staging/ks7010/eap_packet.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h
> index df7f760..90432ff 100644
> --- a/drivers/staging/ks7010/eap_packet.h
> +++ b/drivers/staging/ks7010/eap_packet.h
> @@ -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 :(

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue
  2016-10-13 16:05 [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue Nadim Almas
  2016-10-13 16:21 ` Greg KH
@ 2016-10-13 19:09 ` Joe Perches
  1 sibling, 0 replies; 4+ messages in thread
From: Joe Perches @ 2016-10-13 19:09 UTC (permalink / raw)
  To: Nadim Almas, gregkh; +Cc: devel, linux-kernel

On Thu, 2016-10-13 at 09:05 -0700, Nadim Almas wrote:
> Fixed coding style issue
> 
> Signed-off-by: Nadim Almas <nadim.902@gmail.com>
> ---
>  drivers/staging/ks7010/eap_packet.h | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/eap_packet.h b/drivers/staging/ks7010/eap_packet.h
> index df7f760..90432ff 100644
> --- a/drivers/staging/ks7010/eap_packet.h
> +++ b/drivers/staging/ks7010/eap_packet.h
> @@ -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
> 

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue
       [not found]   ` <CANQNnfHK8g8VcGN7gzx+25bc7RfEiwcr7wN=b0qcqrLHS6Dg=A@mail.gmail.com>
@ 2016-10-13 19:18     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2016-10-13 19:18 UTC (permalink / raw)
  To: Nadim Almas; +Cc: devel, linux-kernel

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

On Fri, Oct 14, 2016 at 12:34:30AM +0530, Nadim Almas wrote:
> 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
> 
> 
>  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-13 19:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-13 16:05 [PATCH] Staging:ks7010:eap_packet: fixed 80 character line limit coding style issue Nadim Almas
2016-10-13 16:21 ` Greg KH
     [not found]   ` <CANQNnfHK8g8VcGN7gzx+25bc7RfEiwcr7wN=b0qcqrLHS6Dg=A@mail.gmail.com>
2016-10-13 19:18     ` Greg KH
2016-10-13 19:09 ` Joe Perches

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.