mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] net: e1000: fix <NULL>s in log messages
@ 2022-10-31  7:33 Denis Orlov
  2022-11-01  9:01 ` Ahmad Fatoum
  2022-11-02  7:34 ` Sascha Hauer
  0 siblings, 2 replies; 3+ messages in thread
From: Denis Orlov @ 2022-10-31  7:33 UTC (permalink / raw)
  To: barebox; +Cc: Denis Orlov

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-02  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31  7:33 [PATCH] net: e1000: fix <NULL>s in log messages Denis Orlov
2022-11-01  9:01 ` Ahmad Fatoum
2022-11-02  7:34 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox