From: Andre Guedes <andre.guedes@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH 03/10] igc: Use netdev log helpers in igc_ptp.c
Date: Tue, 24 Mar 2020 17:38:17 -0700 [thread overview]
Message-ID: <20200325003824.5487-4-andre.guedes@intel.com> (raw)
In-Reply-To: <20200325003824.5487-1-andre.guedes@intel.com>
In igc_ptp.c we print log messages using dev_* helpers, generating
inconsistent output with the rest of the driver. Since this is a network
device driver, we should preferably use netdev_* helpers because they
append the interface name to the message, helping making sense out of
the logs.
This patch converts all dev_* calls to netdev_*. It also takes this
opportunity to remove the '\n' character at the end of messages since it
is automatically added by netdev_* log helpers.
Signed-off-by: Andre Guedes <andre.guedes@intel.com>
---
drivers/net/ethernet/intel/igc/igc_ptp.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c
index f99c514ad0f4..c292aaf7c79d 100644
--- a/drivers/net/ethernet/intel/igc/igc_ptp.c
+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c
@@ -466,7 +466,7 @@ void igc_ptp_tx_hang(struct igc_adapter *adapter)
* interrupt
*/
rd32(IGC_TXSTMPH);
- dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
+ netdev_warn(adapter->netdev, "Clearing Tx timestamp hang");
}
}
@@ -529,7 +529,7 @@ static void igc_ptp_tx_work(struct work_struct *work)
* interrupt
*/
rd32(IGC_TXSTMPH);
- dev_warn(&adapter->pdev->dev, "clearing Tx timestamp hang\n");
+ netdev_warn(adapter->netdev, "Clearing Tx timestamp hang");
return;
}
@@ -626,10 +626,9 @@ void igc_ptp_init(struct igc_adapter *adapter)
&adapter->pdev->dev);
if (IS_ERR(adapter->ptp_clock)) {
adapter->ptp_clock = NULL;
- dev_err(&adapter->pdev->dev, "ptp_clock_register failed\n");
+ netdev_err(netdev, "ptp_clock_register failed");
} else if (adapter->ptp_clock) {
- dev_info(&adapter->pdev->dev, "added PHC on %s\n",
- adapter->netdev->name);
+ netdev_info(netdev, "PHC added");
adapter->ptp_flags |= IGC_PTP_ENABLED;
}
}
@@ -666,8 +665,7 @@ void igc_ptp_stop(struct igc_adapter *adapter)
if (adapter->ptp_clock) {
ptp_clock_unregister(adapter->ptp_clock);
- dev_info(&adapter->pdev->dev, "removed PHC on %s\n",
- adapter->netdev->name);
+ netdev_info(adapter->netdev, "PHC removed");
adapter->ptp_flags &= ~IGC_PTP_ENABLED;
}
}
--
2.25.0
next prev parent reply other threads:[~2020-03-25 0:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-25 0:38 [Intel-wired-lan] [PATCH 00/10] igc: Align log messages Andre Guedes
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 01/10] igc: Use netdev log helpers in igc_main.c Andre Guedes
2020-04-02 3:33 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 02/10] igc: Use netdev log helpers in igc_ethtool.c Andre Guedes
2020-04-02 3:35 ` Brown, Aaron F
2020-03-25 0:38 ` Andre Guedes [this message]
2020-04-02 3:37 ` [Intel-wired-lan] [PATCH 03/10] igc: Use netdev log helpers in igc_ptp.c Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 04/10] igc: Use netdev log helpers in igc_dump.c Andre Guedes
2020-04-02 3:39 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 05/10] igc: Use netdev log helpers in igc_base.c Andre Guedes
2020-04-02 3:41 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 06/10] igc: Use netdev log helpers in igc_diag.c Andre Guedes
2020-04-02 3:42 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 07/10] igc: Remove '\n' from log strings in igc_i225.c Andre Guedes
2020-04-02 3:44 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 08/10] igc: Remove '\n' from log strings in igc_mac.c Andre Guedes
2020-04-02 3:46 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 09/10] igc: Remove '\n' from log messages in igc_nvm.c Andre Guedes
2020-04-02 3:48 ` Brown, Aaron F
2020-03-25 0:38 ` [Intel-wired-lan] [PATCH 10/10] igc: Remove '\n' from log strings in igc_phy.c Andre Guedes
2020-04-02 3:49 ` Brown, Aaron F
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200325003824.5487-4-andre.guedes@intel.com \
--to=andre.guedes@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox