Message ID | 1357178098-4057-4-git-send-email-barry@grussling.com |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
On Wed, 2013-01-02 at 17:54 -0800, Barry Grussling wrote: > Convert DSA printk calls to netdev_info calls as recommended by > checkpatch.pl. Some defects here. > diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c [] > @@ -237,7 +237,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds) > > if (!link) { > if (netif_carrier_ok(dev)) { > - printk(KERN_INFO "%s: link down\n", dev->name); > + netdev_info(dev, "%s: link down\n", dev->name); Take out the "%s: ...", dev->name uses in these conversions because netdev_printk adds them. netdev_info(dev, "link down\n"); > @@ -248,7 +248,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds) > fc = ((port_status & 0xc000) == 0xc000) ? 1 : 0; > > if (!netif_carrier_ok(dev)) { > - printk(KERN_INFO "%s: link up, %d Mb/s, %s duplex, " > + netdev_info(dev, "%s: link up, %d Mb/s, %s duplex, " > "flow control %sabled\n", dev->name, > speed, duplex ? "full" : "half", > fc ? "en" : "dis"); coalesce formats too netdev_info(dev, "link up, %d Mb/s, %s duplex, flow control %sabled\n" speed, duplex ? "full" : "half", fc ? "en" : "dis"); etc. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/dsa/mv88e6060.c b/drivers/net/dsa/mv88e6060.c index fa6bc7d..dc8b4c1 100644 --- a/drivers/net/dsa/mv88e6060.c +++ b/drivers/net/dsa/mv88e6060.c @@ -237,7 +237,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds) if (!link) { if (netif_carrier_ok(dev)) { - printk(KERN_INFO "%s: link down\n", dev->name); + netdev_info(dev, "%s: link down\n", dev->name); netif_carrier_off(dev); } continue; @@ -248,7 +248,7 @@ static void mv88e6060_poll_link(struct dsa_switch *ds) fc = ((port_status & 0xc000) == 0xc000) ? 1 : 0; if (!netif_carrier_ok(dev)) { - printk(KERN_INFO "%s: link up, %d Mb/s, %s duplex, " + netdev_info(dev, "%s: link up, %d Mb/s, %s duplex, " "flow control %sabled\n", dev->name, speed, duplex ? "full" : "half", fc ? "en" : "dis"); diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c index a2f9e9b6..5260191 100644 --- a/drivers/net/dsa/mv88e6xxx.c +++ b/drivers/net/dsa/mv88e6xxx.c @@ -366,7 +366,7 @@ void mv88e6xxx_poll_link(struct dsa_switch *ds) if (!link) { if (netif_carrier_ok(dev)) { - printk(KERN_INFO "%s: link down\n", dev->name); + netdev_info(dev, "%s: link down\n", dev->name); netif_carrier_off(dev); } continue; @@ -390,7 +390,7 @@ void mv88e6xxx_poll_link(struct dsa_switch *ds) fc = (port_status & 0x8000) ? 1 : 0; if (!netif_carrier_ok(dev)) { - printk(KERN_INFO "%s: link up, %d Mb/s, %s duplex, " + netdev_info(dev, "%s: link up, %d Mb/s, %s duplex, " "flow control %sabled\n", dev->name, speed, duplex ? "full" : "half", fc ? "en" : "dis");
Convert DSA printk calls to netdev_info calls as recommended by checkpatch.pl. Signed-off-by: Barry Grussling <barry@grussling.com> --- drivers/net/dsa/mv88e6060.c | 4 ++-- drivers/net/dsa/mv88e6xxx.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)