Re: [RFC PATCH] net: macb: Add gmii2rgmii converter support

From: Joe Perches
Date: Mon Jun 20 2016 - 02:08:17 EST


On Mon, 2016-06-20 at 10:57 +0530, Kedareswara rao Appana wrote:
> This patch adds support for gmii2rgmii converter
> in the macb driver.
[]
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
[]
> @@ -376,6 +389,20 @@ static int macb_mii_probe(struct net_device *dev)
>   int phy_irq;
>   int ret;
>  
> + if (bp->gmii2rgmii_phy_node) {
> + phydev = of_phy_attach(bp->dev,
> +        bp->gmii2rgmii_phy_node,
> +        0, 0);
> + if (!phydev) {
> + dev_err(&bp->pdev->dev, "%s: no gmii_to_rgmii found\n",
> + dev->name);

why use dev_err(&bp->pdev->dev, ...) and not netdev_err(dev, ...) ?