mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Denis Orlov <denorl2009@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] net: e1000: fix <NULL>s in log messages
Date: Wed, 2 Nov 2022 08:34:57 +0100	[thread overview]
Message-ID: <20221102073457.GA3143@pengutronix.de> (raw)
In-Reply-To: <20221031073319.1656130-1-denorl2009@gmail.com>

On Mon, Oct 31, 2022 at 10:33:19AM +0300, Denis Orlov wrote:
> 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(-)

Applied, thanks

Sascha

> 
> 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
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



      parent reply	other threads:[~2022-11-02  7:36 UTC|newest]

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

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=20221102073457.GA3143@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=denorl2009@gmail.com \
    /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