mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/4] net: designware: return error value in mii_write
Date: Fri, 30 Nov 2018 10:15:27 +0100	[thread overview]
Message-ID: <20181130091527.xb6ynlznit2aqygm@pengutronix.de> (raw)
In-Reply-To: <20181129113931.5045-4-s.trumtrar@pengutronix.de>

On Thu, Nov 29, 2018 at 12:39:31PM +0100, Steffen Trumtrar wrote:
> Do not drop the error value and use it as a return value instead.
> 
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---
>  drivers/net/designware.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/designware.c b/drivers/net/designware.c
> index 104258e21c51..cb7c4a13719c 100644
> --- a/drivers/net/designware.c
> +++ b/drivers/net/designware.c
> @@ -99,8 +99,7 @@ static int dwc_ether_mii_write(struct mii_bus *dev, int addr, int reg, u16 val)
>  	writel(miiaddr | MII_CLKRANGE_150_250M | MII_BUSY, &mac_p->miiaddr);
>  
>  	/* Needed as a fix for ST-Phy */
> -	dwc_ether_mii_read(dev, addr, reg);
> -	return 0;
> +	return dwc_ether_mii_read(dev, addr, reg);

dwc_ether_mii_read() normally returns the register value on success,
returning this from dwc_ether_mii_write() looks wrong.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2018-11-30  9:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 11:39 [PATCH 1/4] net: designware: socfpga: return error value Steffen Trumtrar
2018-11-29 11:39 ` [PATCH 2/4] net: designware: refactor wait loop to own function Steffen Trumtrar
2018-11-29 11:39 ` [PATCH 3/4] net: designware: reorder execution of write and busy check Steffen Trumtrar
2018-11-29 11:39 ` [PATCH 4/4] net: designware: return error value in mii_write Steffen Trumtrar
2018-11-30  9:15   ` 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=20181130091527.xb6ynlznit2aqygm@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.trumtrar@pengutronix.de \
    /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