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]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6DD0059721@AcuExch.aculab.com>
Date:   Thu, 17 Aug 2017 14:18:29 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'Saeed Mahameed' <saeedm@...lanox.com>,
        "David S. Miller" <davem@...emloft.net>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Leon Romanovsky <leonro@...lanox.com>,
        Or Gerlitz <ogerlitz@...lanox.com>
Subject: RE: [net-next 11/15] net/mlx5e: Properly indent within conditional
 statements

From: Saeed Mahameed
> Sent: 17 August 2017 14:30
> To: David S. Miller
> Cc: netdev@...r.kernel.org; Leon Romanovsky; Or Gerlitz; Saeed Mahameed
> Subject: [net-next 11/15] net/mlx5e: Properly indent within conditional statements
> 
> From: Or Gerlitz <ogerlitz@...lanox.com>
> 
> To fix these checkpatch complaints:
> 
> WARNING: suspect code indent for conditional statements (8, 24)
> +       if (eth_proto & (MLX5E_PROT_MASK(MLX5E_10GBASE_SR)
> [...]
> +                       return PORT_FIBRE;
> 
> Signed-off-by: Or Gerlitz <ogerlitz@...lanox.com>
> Signed-off-by: Saeed Mahameed <saeedm@...lanox.com>
> ---
>  .../net/ethernet/mellanox/mlx5/core/en_ethtool.c   | 22 +++++++++++-----------
>  1 file changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> index a75ac4d11c5b..ed161312a773 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
> @@ -988,23 +988,23 @@ static u8 get_connector_port(u32 eth_proto, u8 connector_type)
>  		return ptys2connector_type[connector_type];
> 
>  	if (eth_proto & (MLX5E_PROT_MASK(MLX5E_10GBASE_SR)
> -			 | MLX5E_PROT_MASK(MLX5E_40GBASE_SR4)
> -			 | MLX5E_PROT_MASK(MLX5E_100GBASE_SR4)
> -			 | MLX5E_PROT_MASK(MLX5E_1000BASE_CX_SGMII))) {
> -			return PORT_FIBRE;
> +	    | MLX5E_PROT_MASK(MLX5E_40GBASE_SR4)
> +	    | MLX5E_PROT_MASK(MLX5E_100GBASE_SR4)
> +	    | MLX5E_PROT_MASK(MLX5E_1000BASE_CX_SGMII))) {
> +		return PORT_FIBRE;

Gah, that is why the rules are stupid.
If anything the continuation lines want indenting a few more bytes.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ