From: zhangfei.gao@linaro.org (zhangfei)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 2/2] net: hisilicon: add hix5hd2 mac driver
Date: Tue, 03 Jun 2014 13:38:30 +0800 [thread overview]
Message-ID: <538D5F56.1030106@linaro.org> (raw)
In-Reply-To: <20140602.161131.783479189097234753.davem@davemloft.net>
On 06/03/2014 07:11 AM, David Miller wrote:
> 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.
Got it, not know this rule, will update accordingly.
>> +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.
>
Will use usleep_range(10, 20) instead.
Thanks
WARNING: multiple messages have this Message-ID (diff)
From: zhangfei <zhangfei.gao@linaro.org>
To: David Miller <davem@davemloft.net>
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: Tue, 03 Jun 2014 13:38:30 +0800 [thread overview]
Message-ID: <538D5F56.1030106@linaro.org> (raw)
In-Reply-To: <20140602.161131.783479189097234753.davem@davemloft.net>
On 06/03/2014 07:11 AM, David Miller wrote:
> 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.
Got it, not know this rule, will update accordingly.
>> +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.
>
Will use usleep_range(10, 20) instead.
Thanks
next prev parent reply other threads:[~2014-06-03 5:38 UTC|newest]
Thread overview: 10+ 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 ` Zhangfei Gao
2014-05-30 9:02 ` [PATCH v3 1/2] Documentation: add Device tree bindings for Hisilicon hix5hd2 ethernet Zhangfei Gao
2014-05-30 9:02 ` Zhangfei Gao
2014-05-30 9:02 ` [PATCH v3 2/2] net: hisilicon: add hix5hd2 mac driver Zhangfei Gao
2014-05-30 9:02 ` Zhangfei Gao
2014-06-02 23:11 ` David Miller
2014-06-02 23:11 ` David Miller
2014-06-03 5:38 ` zhangfei [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=538D5F56.1030106@linaro.org \
--to=zhangfei.gao@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.