diff options
author | Joe Perches <joe@perches.com> | 2012-06-09 03:49:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-11 19:58:24 -0400 |
commit | 8d242488ce4627dd7e6333caab56df11ea25e239 (patch) | |
tree | 61d464de218ba9cb22d15735a54b49d230068c16 /drivers/net/phy/dp83640.c | |
parent | de74e92aa8a44d0b80a53601dc4f6dd6afcb8453 (diff) |
phy: Use pr_<level>
Use a more current logging style.
Add pr_fmt and missing newlines.
Remove embedded prefixes.
Neaten phy_print_status to avoid using KERN_CONT.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/dp83640.c')
-rw-r--r-- | drivers/net/phy/dp83640.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index 940b29022d0c..b0da0226661f 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c | |||
@@ -17,6 +17,9 @@ | |||
17 | * along with this program; if not, write to the Free Software | 17 | * along with this program; if not, write to the Free Software |
18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 18 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | */ | 19 | */ |
20 | |||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
20 | #include <linux/ethtool.h> | 23 | #include <linux/ethtool.h> |
21 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
22 | #include <linux/list.h> | 25 | #include <linux/list.h> |
@@ -453,16 +456,16 @@ static void enable_status_frames(struct phy_device *phydev, bool on) | |||
453 | ext_write(0, phydev, PAGE6, PSF_CFG1, ver); | 456 | ext_write(0, phydev, PAGE6, PSF_CFG1, ver); |
454 | 457 | ||
455 | if (!phydev->attached_dev) { | 458 | if (!phydev->attached_dev) { |
456 | pr_warning("dp83640: expected to find an attached netdevice\n"); | 459 | pr_warn("expected to find an attached netdevice\n"); |
457 | return; | 460 | return; |
458 | } | 461 | } |
459 | 462 | ||
460 | if (on) { | 463 | if (on) { |
461 | if (dev_mc_add(phydev->attached_dev, status_frame_dst)) | 464 | if (dev_mc_add(phydev->attached_dev, status_frame_dst)) |
462 | pr_warning("dp83640: failed to add mc address\n"); | 465 | pr_warn("failed to add mc address\n"); |
463 | } else { | 466 | } else { |
464 | if (dev_mc_del(phydev->attached_dev, status_frame_dst)) | 467 | if (dev_mc_del(phydev->attached_dev, status_frame_dst)) |
465 | pr_warning("dp83640: failed to delete mc address\n"); | 468 | pr_warn("failed to delete mc address\n"); |
466 | } | 469 | } |
467 | } | 470 | } |
468 | 471 | ||
@@ -582,9 +585,9 @@ static void recalibrate(struct dp83640_clock *clock) | |||
582 | * read out and correct offsets | 585 | * read out and correct offsets |
583 | */ | 586 | */ |
584 | val = ext_read(master, PAGE4, PTP_STS); | 587 | val = ext_read(master, PAGE4, PTP_STS); |
585 | pr_info("master PTP_STS 0x%04hx", val); | 588 | pr_info("master PTP_STS 0x%04hx\n", val); |
586 | val = ext_read(master, PAGE4, PTP_ESTS); | 589 | val = ext_read(master, PAGE4, PTP_ESTS); |
587 | pr_info("master PTP_ESTS 0x%04hx", val); | 590 | pr_info("master PTP_ESTS 0x%04hx\n", val); |
588 | event_ts.ns_lo = ext_read(master, PAGE4, PTP_EDATA); | 591 | event_ts.ns_lo = ext_read(master, PAGE4, PTP_EDATA); |
589 | event_ts.ns_hi = ext_read(master, PAGE4, PTP_EDATA); | 592 | event_ts.ns_hi = ext_read(master, PAGE4, PTP_EDATA); |
590 | event_ts.sec_lo = ext_read(master, PAGE4, PTP_EDATA); | 593 | event_ts.sec_lo = ext_read(master, PAGE4, PTP_EDATA); |
@@ -594,9 +597,9 @@ static void recalibrate(struct dp83640_clock *clock) | |||
594 | list_for_each(this, &clock->phylist) { | 597 | list_for_each(this, &clock->phylist) { |
595 | tmp = list_entry(this, struct dp83640_private, list); | 598 | tmp = list_entry(this, struct dp83640_private, list); |
596 | val = ext_read(tmp->phydev, PAGE4, PTP_STS); | 599 | val = ext_read(tmp->phydev, PAGE4, PTP_STS); |
597 | pr_info("slave PTP_STS 0x%04hx", val); | 600 | pr_info("slave PTP_STS 0x%04hx\n", val); |
598 | val = ext_read(tmp->phydev, PAGE4, PTP_ESTS); | 601 | val = ext_read(tmp->phydev, PAGE4, PTP_ESTS); |
599 | pr_info("slave PTP_ESTS 0x%04hx", val); | 602 | pr_info("slave PTP_ESTS 0x%04hx\n", val); |
600 | event_ts.ns_lo = ext_read(tmp->phydev, PAGE4, PTP_EDATA); | 603 | event_ts.ns_lo = ext_read(tmp->phydev, PAGE4, PTP_EDATA); |
601 | event_ts.ns_hi = ext_read(tmp->phydev, PAGE4, PTP_EDATA); | 604 | event_ts.ns_hi = ext_read(tmp->phydev, PAGE4, PTP_EDATA); |
602 | event_ts.sec_lo = ext_read(tmp->phydev, PAGE4, PTP_EDATA); | 605 | event_ts.sec_lo = ext_read(tmp->phydev, PAGE4, PTP_EDATA); |
@@ -686,7 +689,7 @@ static void decode_rxts(struct dp83640_private *dp83640, | |||
686 | prune_rx_ts(dp83640); | 689 | prune_rx_ts(dp83640); |
687 | 690 | ||
688 | if (list_empty(&dp83640->rxpool)) { | 691 | if (list_empty(&dp83640->rxpool)) { |
689 | pr_debug("dp83640: rx timestamp pool is empty\n"); | 692 | pr_debug("rx timestamp pool is empty\n"); |
690 | goto out; | 693 | goto out; |
691 | } | 694 | } |
692 | rxts = list_first_entry(&dp83640->rxpool, struct rxts, list); | 695 | rxts = list_first_entry(&dp83640->rxpool, struct rxts, list); |
@@ -709,7 +712,7 @@ static void decode_txts(struct dp83640_private *dp83640, | |||
709 | skb = skb_dequeue(&dp83640->tx_queue); | 712 | skb = skb_dequeue(&dp83640->tx_queue); |
710 | 713 | ||
711 | if (!skb) { | 714 | if (!skb) { |
712 | pr_debug("dp83640: have timestamp but tx_queue empty\n"); | 715 | pr_debug("have timestamp but tx_queue empty\n"); |
713 | return; | 716 | return; |
714 | } | 717 | } |
715 | ns = phy2txts(phy_txts); | 718 | ns = phy2txts(phy_txts); |
@@ -847,7 +850,7 @@ static void dp83640_free_clocks(void) | |||
847 | list_for_each_safe(this, next, &phyter_clocks) { | 850 | list_for_each_safe(this, next, &phyter_clocks) { |
848 | clock = list_entry(this, struct dp83640_clock, list); | 851 | clock = list_entry(this, struct dp83640_clock, list); |
849 | if (!list_empty(&clock->phylist)) { | 852 | if (!list_empty(&clock->phylist)) { |
850 | pr_warning("phy list non-empty while unloading"); | 853 | pr_warn("phy list non-empty while unloading\n"); |
851 | BUG(); | 854 | BUG(); |
852 | } | 855 | } |
853 | list_del(&clock->list); | 856 | list_del(&clock->list); |