devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Dongpo <lidongpo@hisilicon.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: f.fainelli@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com,
	davem@davemloft.net, xuejiancheng@hisilicon.com,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC
Date: Tue, 14 Jun 2016 16:24:48 +0800	[thread overview]
Message-ID: <575FBF50.30904@hisilicon.com> (raw)
In-Reply-To: <20160613133230.GA3132@lunn.ch>



On 2016/6/13 21:32, Andrew Lunn wrote:
> On Mon, Jun 13, 2016 at 02:07:54PM +0800, Dongpo Li wrote:
>> This patch adds a separate driver for the MDIO interface of the
>> Hisilicon Fast Ethernet MAC.
>>
>> Reviewed-by: Jiancheng Xue <xuejiancheng@hisilicon.com>
>> Signed-off-by: Dongpo Li <lidongpo@hisilicon.com>
>> ---
>>  .../bindings/net/hisilicon-femac-mdio.txt          |  22 +++
>>  drivers/net/phy/Kconfig                            |   8 +
>>  drivers/net/phy/Makefile                           |   1 +
>>  drivers/net/phy/mdio-hisi-femac.c                  | 165 +++++++++++++++++++++
>>  4 files changed, 196 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/net/hisilicon-femac-mdio.txt
>>  create mode 100644 drivers/net/phy/mdio-hisi-femac.c

[...]
>> +
> 
> Hi Dongpo
> 
> Overall this looks good. Just some minor comments
> 
>> +static int hisi_femac_mdio_wait_ready(struct mii_bus *bus)
>> +{
>> +	struct hisi_femac_mdio_data *data = bus->priv;
> 
> You could just pass data here. Your read and write functions already
> have it.
> 
Thank you, I will fix it in next patch version.

>> +	data->clk = devm_clk_get(&pdev->dev, NULL);
>> +	if (IS_ERR(data->clk)) {
>> +		ret = -ENODEV;
>> +		goto err_out_free_mdiobus;
>> +	}
> 
> Return the error which devm_clk_get() gives you.
> 
ok, I will fix it.

>> +
>> +	ret = clk_prepare_enable(data->clk);
>> +	if (ret)
>> +		goto err_out_free_mdiobus;
>> +
>> +	ret = of_mdiobus_register(bus, np);
>> +	if (ret)
>> +		goto err_out_free_mdiobus;
> 
> You leave the clock prepared and enabled on error.
> 
ok, I will fix it.

>     Andrew
> 
> .
> 

  reply	other threads:[~2016-06-14  8:24 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  6:07 [PATCH 0/3] Add Hisilicon MDIO bus driver and FEMAC driver Dongpo Li
2016-06-13  6:07 ` [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC Dongpo Li
2016-06-13 13:32   ` Andrew Lunn
2016-06-14  8:24     ` Li Dongpo [this message]
2016-06-14 22:27   ` Rob Herring
2016-06-15  7:49     ` Li Dongpo
2016-06-13  6:07 ` [PATCH 2/3] ethtool: Add common functions for get and set settings Dongpo Li
     [not found]   ` <1465798076-176393-3-git-send-email-lidongpo-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2016-06-13  7:36     ` kbuild test robot
2016-06-13  8:11   ` kbuild test robot
2016-06-13  8:38   ` kbuild test robot
2016-06-13  6:07 ` [PATCH 3/3] net: hisilicon: Add Fast Ethernet MAC driver Dongpo Li
     [not found]   ` <1465798076-176393-4-git-send-email-lidongpo-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2016-06-13  7:12     ` kbuild test robot
2016-06-14 22:31     ` Rob Herring
2016-06-15 10:08       ` Dongpo Li
2016-06-13  9:06   ` Arnd Bergmann
2016-06-14 13:17     ` Li Dongpo
     [not found]       ` <576003F8.3090000-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2016-06-14 21:20         ` Arnd Bergmann
2016-06-15  9:56           ` Dongpo Li
2016-06-28  9:21           ` Dongpo Li
     [not found]             ` <5772418F.9040101-C8/M+/jPZTeaMJb+Lgu22Q@public.gmane.org>
2016-06-28  9:34               ` Arnd Bergmann
2016-07-11  3:44                 ` Dongpo Li
2016-07-11  8:16                   ` Arnd Bergmann
2016-07-11  8:33                     ` Dongpo Li

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=575FBF50.30904@hisilicon.com \
    --to=lidongpo@hisilicon.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=xuejiancheng@hisilicon.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).