* [patch 1/2 -next] mdio: remove an unneed condition
@ 2016-01-12 9:35 Dan Carpenter
2016-01-12 14:09 ` Andrew Lunn
2016-01-12 19:30 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-01-12 9:35 UTC (permalink / raw)
To: Florian Fainelli, Andrew Lunn
Cc: Rob Herring, Frank Rowand, Grant Likely, netdev, devicetree,
linux-kernel, kernel-janitors
It used to be that mdio->irq was a pointer but after e7f4dc3536a4
('mdio: Move allocation of interrupts into core') it's an array inside
the mdio struct so it can never be NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index c0a8f84..86829f8 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -62,11 +62,9 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
rc = irq_of_parse_and_map(child, 0);
if (rc > 0) {
phy->irq = rc;
- if (mdio->irq)
- mdio->irq[addr] = rc;
+ mdio->irq[addr] = rc;
} else {
- if (mdio->irq)
- phy->irq = mdio->irq[addr];
+ phy->irq = mdio->irq[addr];
}
if (of_property_read_bool(child, "broken-turn-around"))
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [patch 1/2 -next] mdio: remove an unneed condition
2016-01-12 9:35 [patch 1/2 -next] mdio: remove an unneed condition Dan Carpenter
@ 2016-01-12 14:09 ` Andrew Lunn
2016-01-12 19:30 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2016-01-12 14:09 UTC (permalink / raw)
To: Dan Carpenter
Cc: Florian Fainelli, Rob Herring, Frank Rowand, Grant Likely,
netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
On Tue, Jan 12, 2016 at 12:35:34PM +0300, Dan Carpenter wrote:
> It used to be that mdio->irq was a pointer but after e7f4dc3536a4
> ('mdio: Move allocation of interrupts into core') it's an array inside
> the mdio struct so it can never be NULL.
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
For both patches:
Reviewd-by: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>
Thanks
Andrew
>
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index c0a8f84..86829f8 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -62,11 +62,9 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio, struct device_node *chi
> rc = irq_of_parse_and_map(child, 0);
> if (rc > 0) {
> phy->irq = rc;
> - if (mdio->irq)
> - mdio->irq[addr] = rc;
> + mdio->irq[addr] = rc;
> } else {
> - if (mdio->irq)
> - phy->irq = mdio->irq[addr];
> + phy->irq = mdio->irq[addr];
> }
>
> if (of_property_read_bool(child, "broken-turn-around"))
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/2 -next] mdio: remove an unneed condition
2016-01-12 9:35 [patch 1/2 -next] mdio: remove an unneed condition Dan Carpenter
2016-01-12 14:09 ` Andrew Lunn
@ 2016-01-12 19:30 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2016-01-12 19:30 UTC (permalink / raw)
To: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA
Cc: f.fainelli-Re5JQEeQqe8AvxtiuMwx3w, andrew-g2DYL2Zd6BY,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
frowand.list-Re5JQEeQqe8AvxtiuMwx3w,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
netdev-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Date: Tue, 12 Jan 2016 12:35:34 +0300
> It used to be that mdio->irq was a pointer but after e7f4dc3536a4
> ('mdio: Move allocation of interrupts into core') it's an array inside
> the mdio struct so it can never be NULL.
>
> Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-01-12 19:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-12 9:35 [patch 1/2 -next] mdio: remove an unneed condition Dan Carpenter
2016-01-12 14:09 ` Andrew Lunn
2016-01-12 19:30 ` 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).