Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1307153 > unrolled thread

[patch 2/2 -next] phy: remove an unneeded condition

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2016-01-12 10:40 +0100
Last post2016-01-12 20:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [patch 2/2 -next] phy: remove an unneeded condition Dan Carpenter <dan.carpenter@oracle.com> - 2016-01-12 10:40 +0100
    Re: [patch 2/2 -next] phy: remove an unneeded condition David Miller <davem@davemloft.net> - 2016-01-12 20:40 +0100

#1307153 — [patch 2/2 -next] phy: remove an unneeded condition

FromDan Carpenter <dan.carpenter@oracle.com>
Date2016-01-12 10:40 +0100
Subject[patch 2/2 -next] phy: remove an unneeded condition
Message-ID<qQ3AK-7rn-9@gated-at.bofh.it>
It used to be that bus->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.  Let's remove the check.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 3193006..903737a 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -340,7 +340,7 @@ struct phy_device *phy_device_create(struct mii_bus *bus, int addr, int phy_id,
 	dev->phy_id = phy_id;
 	if (c45_ids)
 		dev->c45_ids = *c45_ids;
-	dev->irq = bus->irq ? bus->irq[addr] : PHY_POLL;
+	dev->irq = bus->irq[addr];
 	dev_set_name(&mdiodev->dev, PHY_ID_FMT, bus->id, addr);
 
 	dev->state = PHY_DOWN;

[toc] | [next] | [standalone]


#1307769

FromDavid Miller <davem@davemloft.net>
Date2016-01-12 20:40 +0100
Message-ID<qQcXp-5t4-25@gated-at.bofh.it>
In reply to#1307153
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue, 12 Jan 2016 12:36:21 +0300

> It used to be that bus->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.  Let's remove the check.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web