From: Antoine Tenart <antoine.tenart@bootlin.com>
To: Quentin Schulz <foss@0leil.net>
Cc: Antoine Tenart <antoine.tenart@bootlin.com>,
davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com,
hkallweit1@gmail.com, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] net: phy: mscc: implement RGMII skew delay configuration
Date: Thu, 27 Feb 2020 19:55:26 +0100 [thread overview]
Message-ID: <20200227185526.GE1686232@kwain> (raw)
In-Reply-To: <1f267571ddd9d1caf3e95afe31e47e30@0leil.net>
Hi Quentin,
On Thu, Feb 27, 2020 at 05:21:58PM +0100, Quentin Schulz wrote:
> On 2020-02-27 16:28, Antoine Tenart wrote:
> >
> > + if (of_find_property(dev->of_node, "vsc8584,rgmii-skew-rx", NULL) ||
> > + of_find_property(dev->of_node, "vsc8584,rgmii-skew-tx", NULL)) {
> > + of_property_read_u32(dev->of_node, "vsc8584,rgmii-skew-rx",
> > &skew_rx);
> > + of_property_read_u32(dev->of_node, "vsc8584,rgmii-skew-tx",
> > &skew_tx);
> > +
>
> Reading the code, I think **!**of_property_read_u32 could directly replace
> of_find_property in your condition and spare you two calls to that function.
Sure.
> Final nitpick: I would see a check of the skew_rx/tx from DT before you put
> them in the following line, they could be drastically different from 0-8
> value set that you expect considering you're reading a u32 (pass them
> through a GENMASK at least?)
That makes sense, I can add a check.
Thanks,
Antoine
--
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2020-02-27 18:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 15:28 [PATCH net-next 0/3] net: phy: mscc: add support for RGMII MAC mode Antoine Tenart
2020-02-27 15:28 ` [PATCH net-next 1/3] " Antoine Tenart
2020-02-27 16:09 ` Quentin Schulz
2020-02-27 15:28 ` [PATCH net-next 2/3] dt-bindings: net: phy: mscc: document rgmii skew properties Antoine Tenart
2020-02-27 15:28 ` [PATCH net-next 3/3] net: phy: mscc: implement RGMII skew delay configuration Antoine Tenart
2020-02-27 15:51 ` Andrew Lunn
2020-02-27 16:01 ` Antoine Tenart
2020-02-27 16:21 ` Quentin Schulz
2020-02-27 16:25 ` Andrew Lunn
2020-02-27 18:53 ` Antoine Tenart
2020-02-27 18:55 ` Antoine Tenart [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=20200227185526.GE1686232@kwain \
--to=antoine.tenart@bootlin.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=foss@0leil.net \
--cc=hkallweit1@gmail.com \
--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).