From: David Miller <davem@davemloft.net>
To: zhangfei.gao@linaro.org
Cc: arnd@arndb.de, f.fainelli@gmail.com,
sergei.shtylyov@cogentembedded.com, mark.rutland@arm.com,
David.Laight@ACULAB.COM, eric.dumazet@gmail.com,
haifeng.yan@linaro.org, jchxue@gmail.com,
linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 2/2] net: hisilicon: add hix5hd2 mac driver
Date: Mon, 02 Jun 2014 16:11:31 -0700 (PDT) [thread overview]
Message-ID: <20140602.161131.783479189097234753.davem@davemloft.net> (raw)
In-Reply-To: <1401440528-7804-3-git-send-email-zhangfei.gao@linaro.org>
From: Zhangfei Gao <zhangfei.gao@linaro.org>
Date: Fri, 30 May 2014 17:02:08 +0800
> + skb = netdev_alloc_skb_ip_align(priv->netdev,
> + MAC_MAX_FRAME_SIZE);
When a function call, declaration, or definition spans multiple lines,
you must start the arguments on the second and subsequent lines exactly
at the first column after the openning parenthesis.
Please therefore reindent this properly.
> + addr = dma_map_single(priv->dev, skb->data,
> + MAC_MAX_FRAME_SIZE, DMA_FROM_DEVICE);
Likewise.
> + desc->cmd = cpu_to_le32(DESC_VLD_FREE |
> + (MAC_MAX_FRAME_SIZE - 1) << DESC_BUFF_LEN_OFF);
Likewise.
> + desc->cmd = cpu_to_le32(DESC_VLD_BUSY | DESC_FL_FULL |
> + (skb->len & DESC_DATA_MASK) << DESC_DATA_LEN_OFF |
> + (skb->len & DESC_DATA_MASK) << DESC_BUFF_LEN_OFF);
Likewise.
> + priv->phy = of_phy_connect(dev, priv->phy_node,
> + &hix5hd2_adjust_link, 0, priv->phy_mode);
Likewise.
> +static int hix5hd2_mdio_wait_ready(struct mii_bus *bus)
> +{
> + struct hix5hd2_priv *priv = bus->priv;
> + void __iomem *base = priv->base;
> + int i, timeout = 10000;
> +
> + for (i = 0; readl_relaxed(base + MDIO_SINGLE_CMD) & MDIO_START; i++) {
> + if (i == timeout)
> + return -ETIMEDOUT;
> + udelay(1);
> + }
> +
> + return 0;
> +}
10,000 udelay(1)'s is a long time, consider changing to usleep() or
similar.
> + dma_free_coherent(priv->dev, priv->pool[i].size,
> + priv->pool[i].desc,
> + priv->pool[i].phys_addr);
Indentation.
> + virt_addr = dma_alloc_coherent(dev, size, &phys_addr,
> + GFP_KERNEL);
Likewise.
> + netdev_warn(ndev, "using random MAC address %pM\n",
> + ndev->dev_addr);
Likewise.
next prev parent reply other threads:[~2014-06-02 23:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-30 9:02 [PATCH v3 0/2] add hix5hd2 mac driver Zhangfei Gao
2014-05-30 9:02 ` [PATCH v3 1/2] Documentation: add Device tree bindings for Hisilicon hix5hd2 ethernet Zhangfei Gao
[not found] ` <1401440528-7804-1-git-send-email-zhangfei.gao-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2014-05-30 9:02 ` [PATCH v3 2/2] net: hisilicon: add hix5hd2 mac driver Zhangfei Gao
2014-06-02 23:11 ` David Miller [this message]
2014-06-03 5:38 ` zhangfei
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=20140602.161131.783479189097234753.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=David.Laight@ACULAB.COM \
--cc=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=eric.dumazet@gmail.com \
--cc=f.fainelli@gmail.com \
--cc=haifeng.yan@linaro.org \
--cc=jchxue@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=sergei.shtylyov@cogentembedded.com \
--cc=zhangfei.gao@linaro.org \
/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).