Re: [PATCH] net/macb: Add hardware revision information during probe
From: Alexandre Belloni Date: Thu, 11 Sep 2014 16:51:36 +0200 > From: Bo Shen > > Signed-off-by: Bo Shen > Signed-off-by: Nicolas Ferre > --- > drivers/net/ethernet/cadence/macb.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/ethernet/cadence/macb.c > b/drivers/net/ethernet/cadence/macb.c > index ca5d7798b265..a3b35c146d9c 100644 > --- a/drivers/net/ethernet/cadence/macb.c > +++ b/drivers/net/ethernet/cadence/macb.c > @@ -2241,6 +2241,7 @@ static int __init macb_probe(struct platform_device > *pdev) > > netif_carrier_off(dev); > > + netdev_info(dev, "Cadence rev 0x%08x\n", macb_readl(bp, MID)); > netdev_info(dev, "Cadence %s at 0x%08lx irq %d (%pM)\n", > macb_is_gem(bp) ? "GEM" : "MACB", dev->base_addr, > dev->irq, dev->dev_addr); This is really sloppy. The "Cadence %s at ..." is what announces the device, therefore it's out of context to print out the device revision beforehand. Why don't you just add it to the existing printout instead? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] net/macb: Add hardware revision information during probe
From: Alexandre Belloni alexandre.bell...@free-electrons.com Date: Thu, 11 Sep 2014 16:51:36 +0200 From: Bo Shen voice.s...@atmel.com Signed-off-by: Bo Shen voice.s...@atmel.com Signed-off-by: Nicolas Ferre nicolas.fe...@atmel.com --- drivers/net/ethernet/cadence/macb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c index ca5d7798b265..a3b35c146d9c 100644 --- a/drivers/net/ethernet/cadence/macb.c +++ b/drivers/net/ethernet/cadence/macb.c @@ -2241,6 +2241,7 @@ static int __init macb_probe(struct platform_device *pdev) netif_carrier_off(dev); + netdev_info(dev, Cadence rev 0x%08x\n, macb_readl(bp, MID)); netdev_info(dev, Cadence %s at 0x%08lx irq %d (%pM)\n, macb_is_gem(bp) ? GEM : MACB, dev-base_addr, dev-irq, dev-dev_addr); This is really sloppy. The Cadence %s at ... is what announces the device, therefore it's out of context to print out the device revision beforehand. Why don't you just add it to the existing printout instead? -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/