* [PATCH] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
@ 2014-06-19 17:35 Richard Retanubun
2014-06-19 19:32 ` Sergei Shtylyov
0 siblings, 1 reply; 6+ messages in thread
From: Richard Retanubun @ 2014-06-19 17:35 UTC (permalink / raw)
To: davem
Cc: netdev, devicetree, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, thomas.petazzoni, Richard Retanubun
Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
Fix the parsing of the new fixed link dts bindings for duplex,
pause, and asym_pause by using the correct device node pointer.
Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
---
drivers/of/of_mdio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 7700ddc..c389e7b 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -290,11 +290,13 @@ int of_phy_register_fixed_link(struct device_node *np)
fixed_link_node = of_get_child_by_name(np, "fixed-link");
if (fixed_link_node) {
status.link = 1;
- status.duplex = of_property_read_bool(np, "full-duplex");
+ status.duplex = of_property_read_bool(fixed_link_node,
+ "full-duplex");
if (of_property_read_u32(fixed_link_node, "speed", &status.speed))
return -EINVAL;
- status.pause = of_property_read_bool(np, "pause");
- status.asym_pause = of_property_read_bool(np, "asym-pause");
+ status.pause = of_property_read_bool(fixed_link_node, "pause");
+ status.asym_pause = of_property_read_bool(fixed_link_node,
+ "asym-pause");
of_node_put(fixed_link_node);
return fixed_phy_register(PHY_POLL, &status, np);
}
--
1.8.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
2014-06-19 17:35 [PATCH] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings Richard Retanubun
@ 2014-06-19 19:32 ` Sergei Shtylyov
2014-06-19 21:28 ` [PATCH v2] " Richard Retanubun
0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2014-06-19 19:32 UTC (permalink / raw)
To: Richard Retanubun, davem
Cc: netdev, devicetree, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, thomas.petazzoni
Hello.
On 06/19/2014 09:35 PM, Richard Retanubun wrote:
> Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
> Fix the parsing of the new fixed link dts bindings for duplex,
> pause, and asym_pause by using the correct device node pointer.
> Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
> ---
> drivers/of/of_mdio.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index 7700ddc..c389e7b 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -290,11 +290,13 @@ int of_phy_register_fixed_link(struct device_node *np)
> fixed_link_node = of_get_child_by_name(np, "fixed-link");
> if (fixed_link_node) {
> status.link = 1;
> - status.duplex = of_property_read_bool(np, "full-duplex");
> + status.duplex = of_property_read_bool(fixed_link_node,
> + "full-duplex");
The continuation line should start under 'fixed_link_node', according to
the networking coding style.
> if (of_property_read_u32(fixed_link_node, "speed", &status.speed))
> return -EINVAL;
> - status.pause = of_property_read_bool(np, "pause");
> - status.asym_pause = of_property_read_bool(np, "asym-pause");
> + status.pause = of_property_read_bool(fixed_link_node, "pause");
> + status.asym_pause = of_property_read_bool(fixed_link_node,
> + "asym-pause");
Same here...
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
2014-06-19 19:32 ` Sergei Shtylyov
@ 2014-06-19 21:28 ` Richard Retanubun
2014-06-19 21:34 ` Sergei Shtylyov
0 siblings, 1 reply; 6+ messages in thread
From: Richard Retanubun @ 2014-06-19 21:28 UTC (permalink / raw)
To: sergei.shtylyov
Cc: davem, netdev, devicetree, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, thomas.petazzoni
Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
Fix the parsing of the new fixed link dts bindings for duplex,
pause, and asym_pause by using the correct device node pointer.
Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
---
v2: Clean up code indentation. Thanks Sergei!
drivers/of/of_mdio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 7700ddc..b5f7817 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -290,11 +290,13 @@ int of_phy_register_fixed_link(struct device_node *np)
fixed_link_node = of_get_child_by_name(np, "fixed-link");
if (fixed_link_node) {
status.link = 1;
- status.duplex = of_property_read_bool(np, "full-duplex");
+ status.duplex = of_property_read_bool(fixed_link_node,
+ "full-duplex");
if (of_property_read_u32(fixed_link_node, "speed", &status.speed))
return -EINVAL;
- status.pause = of_property_read_bool(np, "pause");
- status.asym_pause = of_property_read_bool(np, "asym-pause");
+ status.pause = of_property_read_bool(fixed_link_node, "pause");
+ status.asym_pause = of_property_read_bool(fixed_link_node,
+ "asym-pause");
of_node_put(fixed_link_node);
return fixed_phy_register(PHY_POLL, &status, np);
}
--
1.8.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
2014-06-19 21:28 ` [PATCH v2] " Richard Retanubun
@ 2014-06-19 21:34 ` Sergei Shtylyov
2014-06-20 14:11 ` [PATCH v3] " Richard Retanubun
0 siblings, 1 reply; 6+ messages in thread
From: Sergei Shtylyov @ 2014-06-19 21:34 UTC (permalink / raw)
To: Richard Retanubun
Cc: davem, netdev, devicetree, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, thomas.petazzoni
Hello.
On 06/20/2014 01:28 AM, Richard Retanubun wrote:
> Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
> Fix the parsing of the new fixed link dts bindings for duplex,
> pause, and asym_pause by using the correct device node pointer.
> Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
> ---
> v2: Clean up code indentation. Thanks Sergei!
Unfortunately, you've misunderstood me. :-/
> drivers/of/of_mdio.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index 7700ddc..b5f7817 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -290,11 +290,13 @@ int of_phy_register_fixed_link(struct device_node *np)
> fixed_link_node = of_get_child_by_name(np, "fixed-link");
> if (fixed_link_node) {
> status.link = 1;
> - status.duplex = of_property_read_bool(np, "full-duplex");
> + status.duplex = of_property_read_bool(fixed_link_node,
> + "full-duplex");
When I said that continuation line should start under 'fixed_link_node', I
meant it should start right under first letter of this name, after (. You
don't need to use tabs only when indenting the networking code, appropriate
number of spaces after tabs is OK.
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
2014-06-19 21:34 ` Sergei Shtylyov
@ 2014-06-20 14:11 ` Richard Retanubun
2014-06-23 4:35 ` David Miller
0 siblings, 1 reply; 6+ messages in thread
From: Richard Retanubun @ 2014-06-20 14:11 UTC (permalink / raw)
To: sergei.shtylyov
Cc: davem, netdev, devicetree, robh+dt, pawel.moll, mark.rutland,
ijc+devicetree, galak, thomas.petazzoni
Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
Fix the parsing of the new fixed link dts bindings for duplex,
pause, and asym_pause by using the correct device node pointer.
Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
---
v3: New and improved code indent.
drivers/of/of_mdio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 7700ddc..3812596 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -290,11 +290,13 @@ int of_phy_register_fixed_link(struct device_node *np)
fixed_link_node = of_get_child_by_name(np, "fixed-link");
if (fixed_link_node) {
status.link = 1;
- status.duplex = of_property_read_bool(np, "full-duplex");
+ status.duplex = of_property_read_bool(fixed_link_node,
+ "full-duplex");
if (of_property_read_u32(fixed_link_node, "speed", &status.speed))
return -EINVAL;
- status.pause = of_property_read_bool(np, "pause");
- status.asym_pause = of_property_read_bool(np, "asym-pause");
+ status.pause = of_property_read_bool(fixed_link_node, "pause");
+ status.asym_pause = of_property_read_bool(fixed_link_node,
+ "asym-pause");
of_node_put(fixed_link_node);
return fixed_phy_register(PHY_POLL, &status, np);
}
--
1.8.5.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
2014-06-20 14:11 ` [PATCH v3] " Richard Retanubun
@ 2014-06-23 4:35 ` David Miller
0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2014-06-23 4:35 UTC (permalink / raw)
To: rretanubun.work
Cc: sergei.shtylyov, netdev, devicetree, robh+dt, pawel.moll,
mark.rutland, ijc+devicetree, galak, thomas.petazzoni
From: Richard Retanubun <rretanubun.work@gmail.com>
Date: Fri, 20 Jun 2014 10:11:07 -0400
> Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
>
> Fix the parsing of the new fixed link dts bindings for duplex,
> pause, and asym_pause by using the correct device node pointer.
>
> Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-06-23 4:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-19 17:35 [PATCH] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings Richard Retanubun
2014-06-19 19:32 ` Sergei Shtylyov
2014-06-19 21:28 ` [PATCH v2] " Richard Retanubun
2014-06-19 21:34 ` Sergei Shtylyov
2014-06-20 14:11 ` [PATCH v3] " Richard Retanubun
2014-06-23 4:35 ` David Miller
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).