From: <Woojung.Huh@microchip.com>
To: <Horatiu.Vultur@microchip.com>
Cc: <alexandre.belloni@bootlin.com>, <UNGLinuxDriver@microchip.com>,
<davem@davemloft.net>, <andrew@lunn.ch>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <Horatiu.Vultur@microchip.com>
Subject: RE: [PATCH] net: mscc: ocelot: reinterpret the return value of of_get_phy_mode
Date: Mon, 11 Nov 2019 21:47:11 +0000 [thread overview]
Message-ID: <BL0PR11MB3012FA0DEC75685EA73D7F4CE7740@BL0PR11MB3012.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20191111162127.18684-1-horatiu.vultur@microchip.com>
Hi Horatiu,
> - err = of_get_phy_mode(portnp, &phy_mode);
> - if (err && err != -ENODEV)
> - goto out_put_ports;
> + phy_err = of_get_phy_mode(portnp, &phy_mode);
> + if (phy_err)
> + phy_mode = PHY_INTERFACE_MODE_NA;
Because of_get_phy_mode() would assign PHY_INTERFACE_MODE_NA to phy_mode
when error, may not need this "if (phy_err)" statement at all.
Thanks.
Woojung
prev parent reply other threads:[~2019-11-11 21:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-11 16:21 [PATCH] net: mscc: ocelot: reinterpret the return value of of_get_phy_mode Horatiu Vultur
2019-11-11 21:47 ` Woojung.Huh [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=BL0PR11MB3012FA0DEC75685EA73D7F4CE7740@BL0PR11MB3012.namprd11.prod.outlook.com \
--to=woojung.huh@microchip.com \
--cc=Horatiu.Vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).