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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 21 Apr 2017 12:28:02 -0700
From:   Joe Perches <joe@...ches.com>
To:     SF Markus Elfring <elfring@...rs.sourceforge.net>,
        Doug Ledford <dledford@...hat.com>,
        Hal Rosenstock <hal.rosenstock@...il.com>,
        Leon Romanovsky <leonro@...lanox.com>,
        Majd Dibbiny <majd@...lanox.com>,
        Matan Barak <matanb@...lanox.com>,
        Sean Hefty <sean.hefty@...el.com>,
        Yishai Hadas <yishaih@...lanox.com>, linux-rdma@...r.kernel.org
Cc:     LKML <linux-kernel@...r.kernel.org>,
        kernel-janitors@...r.kernel.org, trivial@...nel.org
Subject: Re: [PATCH v2 16/17] IB/mlx4: Add spaces for better code readability

On Fri, 2017-04-21 at 20:54 +0200, SF Markus Elfring wrote:

> Use space characters at some source code places according to
> the Linux coding style convention.

[]

> diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
[]
> @@ -2599,7 +2599,7 @@ static int build_mlx_header(struct mlx4_ib_sqp *sqp, struct ib_ud_wr *wr,
>  		u16 ether_type;
>  		u16 pcp = (be32_to_cpu(ah->av.ib.sl_tclass_flowlabel) >> 29) << 13;
>  
> -		ether_type = (!is_udp) ? ETH_P_IBOE:
> +		ether_type = (!is_udp) ? ETH_P_IBOE :
>  			(ip_version == 4 ? ETH_P_IP : ETH_P_IPV6);

Please refrain from tool generated mechanical changes.

Do try to make the code human readable and correct when
you are also making actual object code differences.

If this is to be modified at all then also please use
consistent ?: condition testing parentheses or perhaps
don't use parentheses at all.

Maybe even align the ETH_P_ uses like:

		ether_type = !is_udp		? ETH_P_IBOE :
			     ip_version == 4	? ETH_P_IP :
						  ETH_P_IPV6;

Powered by blists - more mailing lists