* [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init()
@ 2016-01-09 11:59 Sedat Dilek
2016-01-09 15:55 ` Andrew Lunn
2016-01-10 11:50 ` kbuild test robot
0 siblings, 2 replies; 5+ messages in thread
From: Sedat Dilek @ 2016-01-09 11:59 UTC (permalink / raw)
Cc: Sedat Dilek, Roosen Henri, Andrew Lunn, David Daney,
Florian Fainelli, David S . Miller, netdev
This fixes the following build failure seen in net.git#master on top of
Linux v4.4-rc8+:
drivers/net/phy/micrel.c: In function 'ksz9031_config_init':
drivers/net/phy/micrel.c:492:22: error: 'struct phy_device' has no member named 'dev'
dev_walker = &phydev->dev;
Fixes: b4c19f71252e ("phy: micrel: Fix finding PHY properties in MAC node for KSZ9031.")
CC: Roosen Henri <Henri.Roosen@ginzinger.com>
CC: Andrew Lunn <andrew@lunn.ch>
CC: David Daney <david.daney@cavium.com>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: David S. Miller <davem@davemloft.net>
CC: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
[ dileks: v2: Add "[net]" to the subject-line ]
drivers/net/phy/micrel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 7a5679982c03..a7e17eabec37 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -476,7 +476,7 @@ static int ksz9031_config_init(struct phy_device *phydev)
* properties in the MAC node. Walk up the tree of devices to
* find a device with an OF node.
*/
- dev_walker = &phydev->dev;
+ dev_walker = &phydev->mdio.dev;
do {
of_node = dev_walker->of_node;
dev_walker = dev_walker->parent;
--
2.7.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init()
2016-01-09 11:59 [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init() Sedat Dilek
@ 2016-01-09 15:55 ` Andrew Lunn
2016-01-09 22:24 ` Sedat Dilek
2016-01-10 11:50 ` kbuild test robot
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2016-01-09 15:55 UTC (permalink / raw)
To: Sedat Dilek
Cc: Roosen Henri, David Daney, Florian Fainelli, David S . Miller, netdev
On Sat, Jan 09, 2016 at 12:59:17PM +0100, Sedat Dilek wrote:
> This fixes the following build failure seen in net.git#master on top of
> Linux v4.4-rc8+:
I'm pretty sure this is wrong. Here is why...
net.git has the fix:
commit b4c19f71252e3b6b8c6478fd712c592f00b11438
Author: Roosen Henri <Henri.Roosen@ginzinger.com>
Date: Thu Jan 7 09:31:15 2016 +0100
phy: micrel: Fix finding PHY properties in MAC node for KSZ9031.
Commit 651df2183543 ("phy: micrel: Fix finding PHY properties in MAC
node.") only fixes finding PHY properties in MAC node for KSZ9021. This
commit applies the same fix for KSZ9031.
Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.")
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index e13ad6cdcc22..7a5679982c03 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -470,9 +470,17 @@ static int ksz9031_config_init(struct phy_device *phydev)
"txd2-skew-ps", "txd3-skew-ps"
};
static const char *control_skews[2] = {"txen-skew-ps", "rxdv-skew-ps"};
+ const struct device *dev_walker;
- if (!of_node && dev->parent->of_node)
- of_node = dev->parent->of_node;
+ /* The Micrel driver has a deprecated option to place phy OF
+ * properties in the MAC node. Walk up the tree of devices to
+ * find a device with an OF node.
+ */
+ dev_walker = &phydev->dev;
+ do {
+ of_node = dev_walker->of_node;
+ dev_walker = dev_walker->parent;
+ } while (!of_node && dev_walker);
This brings in the dev_walker, which uses phydev->dev. In net, that is
correct. My patches introducing MDIO device are not in net. They are
only in net-next.
In net-next, this fix does not yet appear. Hence it does not yet have
the change of ->dev to ->mdio.dev.
Somehow, next.git has both net.git and net-next.git. Hence you get the
build error.
Unfortunately, we cannot fix this yet. Your fix needs to go to
net-next. But first Dave needs to merge net.git into net-next.git, so
bringing in Henri's fix. Only then can your fix be applied. My guess
is, Dave will do that Sunday when Linus makes the release and opens
the merge window.
Andrew
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init()
2016-01-09 15:55 ` Andrew Lunn
@ 2016-01-09 22:24 ` Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2016-01-09 22:24 UTC (permalink / raw)
To: Andrew Lunn
Cc: Roosen Henri, David Daney, Florian Fainelli, David S . Miller, netdev
On Sat, Jan 9, 2016 at 4:55 PM, Andrew Lunn <andrew@lunn.ch> wrote:
> On Sat, Jan 09, 2016 at 12:59:17PM +0100, Sedat Dilek wrote:
>> This fixes the following build failure seen in net.git#master on top of
>> Linux v4.4-rc8+:
>
> I'm pretty sure this is wrong. Here is why...
>
> net.git has the fix:
>
> commit b4c19f71252e3b6b8c6478fd712c592f00b11438
> Author: Roosen Henri <Henri.Roosen@ginzinger.com>
> Date: Thu Jan 7 09:31:15 2016 +0100
>
> phy: micrel: Fix finding PHY properties in MAC node for KSZ9031.
>
> Commit 651df2183543 ("phy: micrel: Fix finding PHY properties in MAC
> node.") only fixes finding PHY properties in MAC node for KSZ9021. This
> commit applies the same fix for KSZ9031.
>
> Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.")
> Acked-by: Andrew Lunn <andrew@lunn.ch>
> Signed-off-by: Henri Roosen <henri.roosen@ginzinger.com>
> Signed-off-by: David S. Miller <davem@davemloft.net>
>
> diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
> index e13ad6cdcc22..7a5679982c03 100644
> --- a/drivers/net/phy/micrel.c
> +++ b/drivers/net/phy/micrel.c
> @@ -470,9 +470,17 @@ static int ksz9031_config_init(struct phy_device *phydev)
> "txd2-skew-ps", "txd3-skew-ps"
> };
> static const char *control_skews[2] = {"txen-skew-ps", "rxdv-skew-ps"};
> + const struct device *dev_walker;
>
> - if (!of_node && dev->parent->of_node)
> - of_node = dev->parent->of_node;
> + /* The Micrel driver has a deprecated option to place phy OF
> + * properties in the MAC node. Walk up the tree of devices to
> + * find a device with an OF node.
> + */
> + dev_walker = &phydev->dev;
> + do {
> + of_node = dev_walker->of_node;
> + dev_walker = dev_walker->parent;
> + } while (!of_node && dev_walker);
>
>
> This brings in the dev_walker, which uses phydev->dev. In net, that is
> correct. My patches introducing MDIO device are not in net. They are
> only in net-next.
>
> In net-next, this fix does not yet appear. Hence it does not yet have
> the change of ->dev to ->mdio.dev.
>
> Somehow, next.git has both net.git and net-next.git. Hence you get the
> build error.
>
> Unfortunately, we cannot fix this yet. Your fix needs to go to
> net-next. But first Dave needs to merge net.git into net-next.git, so
> bringing in Henri's fix. Only then can your fix be applied. My guess
> is, Dave will do that Sunday when Linus makes the release and opens
> the merge window.
>
Oops, you are right.
I have both recent net.git and net-next.git on top of Linux v4.4-rc8
and was unsure where to fix it.
So, let's wait till net-next.git has merged net.git.
- Sedat -
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init()
2016-01-09 11:59 [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init() Sedat Dilek
2016-01-09 15:55 ` Andrew Lunn
@ 2016-01-10 11:50 ` kbuild test robot
2016-01-11 9:23 ` Sedat Dilek
1 sibling, 1 reply; 5+ messages in thread
From: kbuild test robot @ 2016-01-10 11:50 UTC (permalink / raw)
To: Sedat Dilek
Cc: kbuild-all, Sedat Dilek, Roosen Henri, Andrew Lunn, David Daney,
Florian Fainelli, David S . Miller, netdev
[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]
Hi Sedat,
[auto build test ERROR on net/master]
[cannot apply to net-next/master v4.4-rc8 next-20160108]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
url: https://github.com/0day-ci/linux/commits/Sedat-Dilek/phy-micrel-Fix-build-failure-in-ksz9031_config_init/20160109-200009
config: x86_64-rhel (attached as .config)
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
drivers/net/phy/micrel.c: In function 'ksz9031_config_init':
>> drivers/net/phy/micrel.c:479:22: error: 'struct phy_device' has no member named 'mdio'
dev_walker = &phydev->mdio.dev;
^
vim +479 drivers/net/phy/micrel.c
473 const struct device *dev_walker;
474
475 /* The Micrel driver has a deprecated option to place phy OF
476 * properties in the MAC node. Walk up the tree of devices to
477 * find a device with an OF node.
478 */
> 479 dev_walker = &phydev->mdio.dev;
480 do {
481 of_node = dev_walker->of_node;
482 dev_walker = dev_walker->parent;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 35587 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init()
2016-01-10 11:50 ` kbuild test robot
@ 2016-01-11 9:23 ` Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2016-01-11 9:23 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Roosen Henri, Andrew Lunn, David Daney,
Florian Fainelli, David S . Miller, netdev, Stephen Rothwell,
linux-next
On Sun, Jan 10, 2016 at 12:50 PM, kbuild test robot <lkp@intel.com> wrote:
> Hi Sedat,
>
> [auto build test ERROR on net/master]
> [cannot apply to net-next/master v4.4-rc8 next-20160108]
> [if your patch is applied to the wrong git tree, please drop us a note to help improving the system]
>
Hi,
Andrew Lunn explained when this build-failure happens in [1].
Short answer: When you merge net.git with net-next.git.
Steven posted and added the same fix for his latest next-20160111 tree
(see [2]).
Dave ACKed it in [3].
- Sedat -
[0] http://marc.info/?l=linux-netdev&m=145235493501557&w=2
[1] http://marc.info/?l=linux-netdev&m=145248039325668&w=2
[3] http://marc.info/?l=linux-netdev&m=145248135925825&w=2
> url: https://github.com/0day-ci/linux/commits/Sedat-Dilek/phy-micrel-Fix-build-failure-in-ksz9031_config_init/20160109-200009
> config: x86_64-rhel (attached as .config)
> reproduce:
> # save the attached .config to linux build tree
> make ARCH=x86_64
>
> All errors (new ones prefixed by >>):
>
> drivers/net/phy/micrel.c: In function 'ksz9031_config_init':
>>> drivers/net/phy/micrel.c:479:22: error: 'struct phy_device' has no member named 'mdio'
> dev_walker = &phydev->mdio.dev;
> ^
>
> vim +479 drivers/net/phy/micrel.c
>
> 473 const struct device *dev_walker;
> 474
> 475 /* The Micrel driver has a deprecated option to place phy OF
> 476 * properties in the MAC node. Walk up the tree of devices to
> 477 * find a device with an OF node.
> 478 */
> > 479 dev_walker = &phydev->mdio.dev;
> 480 do {
> 481 of_node = dev_walker->of_node;
> 482 dev_walker = dev_walker->parent;
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-11 9:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-09 11:59 [PATCH] [net] phy: micrel: Fix build failure in ksz9031_config_init() Sedat Dilek
2016-01-09 15:55 ` Andrew Lunn
2016-01-09 22:24 ` Sedat Dilek
2016-01-10 11:50 ` kbuild test robot
2016-01-11 9:23 ` Sedat Dilek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.