From: Heiner Kallweit <hkallweit1@gmail.com>
To: Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: dsa: bcm_sf2: Propagate error value from mdio_write
Date: Wed, 26 Dec 2018 19:09:21 +0100 [thread overview]
Message-ID: <e3d3b931-0d0d-af39-8b79-001ceb6942cf@gmail.com> (raw)
In-Reply-To: <20181226175001.76546-1-kjlu@umn.edu>
On 26.12.2018 18:50, Kangjie Lu wrote:
> Both bcm_sf2_sw_indir_rw and mdiobus_write_nested could fail, so let's
> return their error codes upstream.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/net/dsa/bcm_sf2.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
> index 2eb68769562c..73fbc16a1f86 100644
> --- a/drivers/net/dsa/bcm_sf2.c
> +++ b/drivers/net/dsa/bcm_sf2.c
> @@ -305,9 +305,8 @@ static int bcm_sf2_sw_mdio_write(struct mii_bus *bus, int addr, int regnum,
> if (addr == BRCM_PSEUDO_PHY_ADDR && priv->indir_phy_mask & BIT(addr))
> bcm_sf2_sw_indir_rw(priv, 0, addr, regnum, val);
> else
> - mdiobus_write_nested(priv->master_mii_bus, addr, regnum, val);
> -
> - return 0;
> + return mdiobus_write_nested(priv->master_mii_bus,
> + addr, regnum, val);
> }
Did you try to compile this? The first branch of the if clause has no return
value any longer.
next prev parent reply other threads:[~2018-12-26 18:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-26 17:50 Kangjie Lu
2018-12-26 18:09 ` Heiner Kallweit [this message]
2018-12-26 21:01 ` kbuild test robot
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=e3d3b931-0d0d-af39-8b79-001ceb6942cf@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pakki001@umn.edu \
--cc=vivien.didelot@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
all inboxes | Powered by JetHome®