lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <128afaebcd8fdb52bd90dcc9a09ee2d23d306a5a.camel@perches.com>
Date:   Mon, 10 Dec 2018 15:23:18 -0800
From:   Joe Perches <joe@...ches.com>
To:     Darya Litvintseva <litv.daria@...il.com>
Cc:     alex.mikhalevich@...il.com,
        "David S. Miller" <davem@...emloft.net>,
        Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] net: fix braces and comments codestyle

On Tue, 2018-12-11 at 02:11 +0300, Darya Litvintseva wrote:
> Signed-off-by: Darya Litvintseva <litv.daria@...il.com>

Hello.

Most maintainers want some patch description
and not a blank commit message.

Whitespace only changes are sometimes not taken.

First kernel patches are best done in drivers/staging.

And some additional comments below...

cheers, Joe

> diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
[]
> @@ -90,9 +90,7 @@ int eth_header(struct sk_buff *skb, struct net_device *dev,
>  	else
>  		eth->h_proto = htons(len);
>  
> -	/*
> -	 *      Set the source hardware address.
> -	 */
> +	/* Set the source hardware address.*/

Most single line comments use a space before the */

> @@ -170,13 +166,11 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
>  			skb->pkt_type = PACKET_BROADCAST;
>  		else
>  			skb->pkt_type = PACKET_MULTICAST;
> -	}
> -	else if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
> +	} else if (unlikely(!ether_addr_equal_64bits(eth->h_dest,
>  						   dev->dev_addr)))

please realign multiline statements to the open parenthesis

> @@ -187,8 +181,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
>  	if (likely(eth_proto_is_802_3(eth->h_proto)))
>  		return eth->h_proto;
>  
> -	/*
> -	 *      This is a magic hack to spot IPX packets. Older Novell breaks
> +	/*      This is a magic hack to spot IPX packets. Older Novell breaks
>  	 *      the protocol design and runs IPX over 802.3 without an 802.2 LLC
>  	 *      layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
>  	 *      won't work for fault tolerant netware but does for the rest.

Given the ipx protocol removal, perhaps this block
should be revisited.

commit e02554e9a4338c58e75fdfb0ef908a5adc86cba5
Author: Stephen Hemminger <stephen@...workplumber.org>
Date:   Tue Nov 14 08:37:14 2017 -0800

    ipx: move Novell IPX protocol support into staging

commit 7a2e838d28cff6718a0bdf66164465402f8e40ed
Author: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Date:   Fri Jun 1 20:39:54 2018 +0200

    staging: ipx: delete it from the tree
    
    The ipx code moved into the staging tree back in November 2017 and no
    one has complained or even noticed it was gone.  Because of that, let's
    just delete it.

> @@ -197,8 +190,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
>  	if (sap && *sap == 0xFFFF)
>  		return htons(ETH_P_802_3);
>  
> -	/*
> -	 *      Real 802.2 LLC
> +	/* Real 802.2 LLC
>  	 */

better to move the closing */ up as a single line comment


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ