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: <1349801661.2386.8.camel@joe-AO722>
Date:	Tue, 09 Oct 2012 09:54:21 -0700
From:	Joe Perches <joe@...ches.com>
To:	Or Gerlitz <ogerlitz@...lanox.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org,
	Eugenia Emantayev <eugenia@...lanox.com>
Subject: Re: [PATCH V1 2/3] net/mlx4_core: Read HCA frequency and map
 internal clock

On Tue, 2012-10-09 at 17:20 +0200, Or Gerlitz wrote:
> Read HCA frequency, read PCI clock bar and offset, map internal clock to PCI bar.

trivial comments below:

> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
[]
> @@ -1193,8 +1195,31 @@ static void unmap_bf_area(struct mlx4_dev *dev)
>  		io_mapping_free(mlx4_priv(dev)->bf_mapping);
>  }
>  
> +static int map_internal_clock(struct mlx4_dev *dev)
> +{
> +	struct mlx4_priv *priv = mlx4_priv(dev);
> +
> +	priv->clock_mapping = ioremap(pci_resource_start(dev->pdev,
> +				priv->fw.clock_bar) +
> +				priv->fw.clock_offset, MLX4_CLOCK_SIZE);

I think this is misleading indentation style.
Perhaps this'd be nicer as something like:

	priv->clock_mapping =
		ioremap(pci_resource_start(dev->pdev, priv->fw.clock_bar) +
			priv->fw.clock_offset, MLX4_CLOCK_SIZE);

[]

> +			/* In case we got HCA frequency 0 - disable timestamping
> +			 * to avoid dividing by zero
> +			 */
> +			if (!dev->caps.hca_core_clock) {
> +				dev->caps.flags2 &= ~MLX4_DEV_CAP_FLAG2_TS;
> +				mlx4_err(dev, "HCA frequency is 0. " \
> +					 "Timestamping is not supported.");

These are missing terminating newlines.
Please don't split format strings like this.  It's hard to grep.
Especially please don't use unnecessary line continuations.
The compiler will concatenate these strings without the \.


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ