Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1307163 > unrolled thread
| Started by | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| First post | 2016-01-12 10:40 +0100 |
| Last post | 2016-01-12 20:40 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[patch 1/2 -next] mdio: remove an unneed condition Dan Carpenter <dan.carpenter@oracle.com> - 2016-01-12 10:40 +0100
Re: [patch 1/2 -next] mdio: remove an unneed condition Andrew Lunn <andrew@lunn.ch> - 2016-01-12 15:10 +0100
Re: [patch 1/2 -next] mdio: remove an unneed condition David Miller <davem@davemloft.net> - 2016-01-12 20:40 +0100
| From | Dan Carpenter <dan.carpenter@oracle.com> |
|---|---|
| Date | 2016-01-12 10:40 +0100 |
| Subject | [patch 1/2 -next] mdio: remove an unneed condition |
| Message-ID | <qQ3AL-7rn-37@gated-at.bofh.it> |
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"))
[toc] | [next] | [standalone]
| From | Andrew Lunn <andrew@lunn.ch> |
|---|---|
| Date | 2016-01-12 15:10 +0100 |
| Message-ID | <qQ7O4-1Z5-77@gated-at.bofh.it> |
| In reply to | #1307163 |
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@oracle.com>
For both patches:
Reviewd-by: Andrew Lunn <andrew@lunn.ch>
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"))
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-01-12 20:40 +0100 |
| Message-ID | <qQcXp-5t4-23@gated-at.bofh.it> |
| In reply to | #1307163 |
From: Dan Carpenter <dan.carpenter@oracle.com>
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@oracle.com>
Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web