mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Denis Orlov <denorl2009@gmail.com>
To: barebox@lists.infradead.org
Cc: Denis Orlov <denorl2009@gmail.com>
Subject: [PATCH] net: e1000: fix <NULL>s in log messages
Date: Mon, 31 Oct 2022 10:33:19 +0300	[thread overview]
Message-ID: <20221031073319.1656130-1-denorl2009@gmail.com> (raw)

We do not have an edev.dev set up yet when we are filling in the device
structure and reading an EEPROM in probe. Besides, using hw->dev for
those messages seems more appropriate.

Signed-off-by: Denis Orlov <denorl2009@gmail.com>
---
 drivers/net/e1000/eeprom.c | 6 +++---
 drivers/net/e1000/main.c   | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/eeprom.c b/drivers/net/e1000/eeprom.c
index 1072bc54ef..27143bd6d0 100644
--- a/drivers/net/e1000/eeprom.c
+++ b/drivers/net/e1000/eeprom.c
@@ -800,7 +800,7 @@ int e1000_validate_eeprom_checksum(struct e1000_hw *hw)
 
 	/* Read the EEPROM */
 	if (e1000_read_eeprom(hw, 0, EEPROM_CHECKSUM_REG + 1, buf) < 0) {
-		dev_err(&hw->edev.dev, "Unable to read EEPROM!\n");
+		dev_err(hw->dev, "Unable to read EEPROM!\n");
 		return -E1000_ERR_EEPROM;
 	}
 
@@ -816,8 +816,8 @@ int e1000_validate_eeprom_checksum(struct e1000_hw *hw)
 		return 0;
 
 	/* Hrm, verification failed, print an error */
-	dev_err(&hw->edev.dev, "EEPROM checksum is incorrect!\n");
-	dev_err(&hw->edev.dev, "  ...register was 0x%04hx, calculated 0x%04hx\n",
+	dev_err(hw->dev, "EEPROM checksum is incorrect!\n");
+	dev_err(hw->dev, "  ...register was 0x%04hx, calculated 0x%04hx\n",
 			checksum_reg, checksum);
 
 	return -E1000_ERR_EEPROM;
diff --git a/drivers/net/e1000/main.c b/drivers/net/e1000/main.c
index 363730de0a..1f84cf2949 100644
--- a/drivers/net/e1000/main.c
+++ b/drivers/net/e1000/main.c
@@ -3226,7 +3226,7 @@ static int e1000_sw_init(struct eth_device *edev)
 	/* identify the MAC */
 	result = e1000_set_mac_type(hw);
 	if (result) {
-		dev_err(&hw->edev.dev, "Unknown MAC Type\n");
+		dev_err(hw->dev, "Unknown MAC Type\n");
 		return result;
 	}
 
-- 
2.30.2




             reply	other threads:[~2022-10-31  7:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-31  7:33 Denis Orlov [this message]
2022-11-01  9:01 ` Ahmad Fatoum
2022-11-02  7:34 ` Sascha Hauer

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=20221031073319.1656130-1-denorl2009@gmail.com \
    --to=denorl2009@gmail.com \
    --cc=barebox@lists.infradead.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