2017-06-02 18:22:55

by David Miller

[permalink] [raw]
Subject: Re: [PATCH net-next] net: phy: use of_mdio_parse_addr

From: Jon Mason <[email protected]>
Date: Wed, 31 May 2017 15:43:30 -0400

> use of_mdio_parse_addr() in place of an OF read of reg and a bounds
> check (which is litterally the exact same thing that
> of_mdio_parse_addr() does)
>
> Signed-off-by: Jon Mason <[email protected]>

Applied, thanks Jon.


2017-06-07 16:25:08

by Liviu Dudau

[permalink] [raw]
Subject: Re: [PATCH net-next] net: phy: use of_mdio_parse_addr

On Fri, Jun 02, 2017 at 02:22:51PM -0400, David Miller wrote:
> From: Jon Mason <[email protected]>
> Date: Wed, 31 May 2017 15:43:30 -0400
>
> > use of_mdio_parse_addr() in place of an OF read of reg and a bounds
> > check (which is litterally the exact same thing that
> > of_mdio_parse_addr() does)
> >
> > Signed-off-by: Jon Mason <[email protected]>
>
> Applied, thanks Jon.

This makes linux-next fail the modules_install target as depmod detects 2 circular
dependencies. Reverting this patch fixes the issue.

depmod: ERROR: Cycle detected: libphy -> of_mdio -> fixed_phy -> libphy
depmod: ERROR: Cycle detected: libphy -> of_mdio -> libphy
depmod: ERROR: Found 3 modules in dependency cycles!
make[1]: *** [/home/dliviu/devel/kernel/Makefile:1245: _modinst_post] Error 1

This is on an ARCH=arm build, build I doubt it makes a difference. Let me know if
you need some .config values in order to reproduce.

Best regards,
Liviu

2017-06-07 20:53:34

by Jon Mason

[permalink] [raw]
Subject: Re: [PATCH net-next] net: phy: use of_mdio_parse_addr

On Wed, Jun 7, 2017 at 12:18 PM, Liviu Dudau <[email protected]> wrote:
> On Fri, Jun 02, 2017 at 02:22:51PM -0400, David Miller wrote:
>> From: Jon Mason <[email protected]>
>> Date: Wed, 31 May 2017 15:43:30 -0400
>>
>> > use of_mdio_parse_addr() in place of an OF read of reg and a bounds
>> > check (which is litterally the exact same thing that
>> > of_mdio_parse_addr() does)
>> >
>> > Signed-off-by: Jon Mason <[email protected]>
>>
>> Applied, thanks Jon.
>
> This makes linux-next fail the modules_install target as depmod detects 2 circular
> dependencies. Reverting this patch fixes the issue.
>
> depmod: ERROR: Cycle detected: libphy -> of_mdio -> fixed_phy -> libphy
> depmod: ERROR: Cycle detected: libphy -> of_mdio -> libphy
> depmod: ERROR: Found 3 modules in dependency cycles!
> make[1]: *** [/home/dliviu/devel/kernel/Makefile:1245: _modinst_post] Error 1

I did not test this as modules. Sorry.

It would be ugly to duplicate the code in both place, and the code in
question does not seem to really need to be in a C file. Perhaps it
can be moved to a header file as an inline function, which would solve
this dependency. Would this be acceptable?

Thanks,
Jon

>
> This is on an ARCH=arm build, build I doubt it makes a difference. Let me know if
> you need some .config values in order to reproduce.
>
> Best regards,
> Liviu
>

2017-06-07 20:54:22

by Florian Fainelli

[permalink] [raw]
Subject: Re: [PATCH net-next] net: phy: use of_mdio_parse_addr

On 06/07/2017 01:53 PM, Jon Mason wrote:
> On Wed, Jun 7, 2017 at 12:18 PM, Liviu Dudau <[email protected]> wrote:
>> On Fri, Jun 02, 2017 at 02:22:51PM -0400, David Miller wrote:
>>> From: Jon Mason <[email protected]>
>>> Date: Wed, 31 May 2017 15:43:30 -0400
>>>
>>>> use of_mdio_parse_addr() in place of an OF read of reg and a bounds
>>>> check (which is litterally the exact same thing that
>>>> of_mdio_parse_addr() does)
>>>>
>>>> Signed-off-by: Jon Mason <[email protected]>
>>>
>>> Applied, thanks Jon.
>>
>> This makes linux-next fail the modules_install target as depmod detects 2 circular
>> dependencies. Reverting this patch fixes the issue.
>>
>> depmod: ERROR: Cycle detected: libphy -> of_mdio -> fixed_phy -> libphy
>> depmod: ERROR: Cycle detected: libphy -> of_mdio -> libphy
>> depmod: ERROR: Found 3 modules in dependency cycles!
>> make[1]: *** [/home/dliviu/devel/kernel/Makefile:1245: _modinst_post] Error 1
>
> I did not test this as modules. Sorry.
>
> It would be ugly to duplicate the code in both place, and the code in
> question does not seem to really need to be in a C file. Perhaps it
> can be moved to a header file as an inline function, which would solve
> this dependency. Would this be acceptable?

You read my mind, was just going to suggest doing that.
--
Florian

2017-06-09 09:00:59

by Michael Ellerman

[permalink] [raw]
Subject: Re: [PATCH net-next] net: phy: use of_mdio_parse_addr

Liviu Dudau <[email protected]> writes:

> On Fri, Jun 02, 2017 at 02:22:51PM -0400, David Miller wrote:
>> From: Jon Mason <[email protected]>
>> Date: Wed, 31 May 2017 15:43:30 -0400
>>
>> > use of_mdio_parse_addr() in place of an OF read of reg and a bounds
>> > check (which is litterally the exact same thing that
>> > of_mdio_parse_addr() does)
>> >
>> > Signed-off-by: Jon Mason <[email protected]>
>>
>> Applied, thanks Jon.
>
> This makes linux-next fail the modules_install target as depmod detects 2 circular
> dependencies. Reverting this patch fixes the issue.
>
> depmod: ERROR: Cycle detected: libphy -> of_mdio -> fixed_phy -> libphy
> depmod: ERROR: Cycle detected: libphy -> of_mdio -> libphy
> depmod: ERROR: Found 3 modules in dependency cycles!
> make[1]: *** [/home/dliviu/devel/kernel/Makefile:1245: _modinst_post] Error 1
>
> This is on an ARCH=arm build, build I doubt it makes a difference. Let me know if
> you need some .config values in order to reproduce.

Same happens on 32-bit powerpc.

cheers