From: Joe Perches <joe@perches.com>
To: Or Gerlitz <ogerlitz@mellanox.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
Eugenia Emantayev <eugenia@mellanox.com>
Subject: Re: [PATCH V1 2/3] net/mlx4_core: Read HCA frequency and map internal clock
Date: Tue, 09 Oct 2012 09:54:21 -0700 [thread overview]
Message-ID: <1349801661.2386.8.camel@joe-AO722> (raw)
In-Reply-To: <1349796013-31106-3-git-send-email-ogerlitz@mellanox.com>
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 \.
next prev parent reply other threads:[~2012-10-09 16:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 15:20 [PATCH V1 0/3] net/mlx4: HW timestamping support Or Gerlitz
2012-10-09 15:20 ` [PATCH V1 1/3] net/mlx4_core: Add timestamping device capability Or Gerlitz
2012-10-09 15:20 ` [PATCH V1 2/3] net/mlx4_core: Read HCA frequency and map internal clock Or Gerlitz
2012-10-09 16:54 ` Joe Perches [this message]
2012-10-09 19:31 ` Or Gerlitz
2012-10-09 15:20 ` [PATCH V1 3/3] net/mlx4_en: Add HW timestamping (TS) support Or Gerlitz
2012-10-10 3:37 ` Richard Cochran
2012-10-10 14:06 ` Or Gerlitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349801661.2386.8.camel@joe-AO722 \
--to=joe@perches.com \
--cc=davem@davemloft.net \
--cc=eugenia@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).