Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1421662

Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC

From Li Dongpo <lidongpo@hisilicon.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC
Date 2016-06-14 10:30 +0200
Message-ID <rJRTs-2gr-9@gated-at.bofh.it> (permalink)
References <rJto5-2pt-3@gated-at.bofh.it> <rJto5-2pt-1@gated-at.bofh.it> <rJAfU-6Tq-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



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
> 
> .
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC Dongpo Li <lidongpo@hisilicon.com> - 2016-06-13 08:20 +0200
  Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC Andrew Lunn <andrew@lunn.ch> - 2016-06-13 15:40 +0200
    Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC Li Dongpo <lidongpo@hisilicon.com> - 2016-06-14 10:30 +0200
  Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC Rob Herring <robh@kernel.org> - 2016-06-15 00:30 +0200
    Re: [PATCH 1/3] net: Add MDIO bus driver for the Hisilicon FEMAC Li Dongpo <lidongpo@hisilicon.com> - 2016-06-15 09:50 +0200

csiph-web