linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Schiller <ms@dev.tdt.de>
To: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	f.fainelli@gmail.com, hkallweit1@gmail.com,
	linux@armlinux.org.uk, davem@davemloft.net, kuba@kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3] net: phy: intel-xway: Add RGMII internal delay configuration
Date: Mon, 19 Jul 2021 10:14:09 +0200	[thread overview]
Message-ID: <42d639692238c4c89fdbca1e0b2b27cd@dev.tdt.de> (raw)
In-Reply-To: <9fa0ce38-d3b5-a60e-cfc4-7799b832065f@hauke-m.de>

On 2021-07-17 18:38, Hauke Mehrtens wrote:
> On 7/13/21 3:06 PM, Andrew Lunn wrote:
>>>> [...]
>>>>> +#if IS_ENABLED(CONFIG_OF_MDIO)
>>>> is there any particular reason why we need to guard this with
>>>> CONFIG_OF_MDIO?
>>>> The dp83822 driver does not use this #if either (as far as I
>>>> understand at least)
>>>> 
>>> 
>>> It makes no sense to retrieve properties from the device tree if we 
>>> are
>>> compiling for a target that does not support a device tree.
>>> At least that is my understanding of this condition.
>> 
>> There should be stubs for all these functions, so if OF is not part of
>> the configured kernel, stub functions take their place. That has the
>> advantage of at least compiling the code, so checking parameter types
>> etc. We try to avoid #ifdef where possible, so we get better compiler
>> build test coverage. The more #ifef there are, the more different
>> configurations that need compiling in order to get build coverage.
>> 
>> 	       Andrew
>> 
> 
> The phy_get_internal_delay() function does not have a stub function
> directly, but it calls phy_get_int_delay_property() which has a stub,
> if CONFIG_OF_MDIO is not set, see:
> https://elixir.bootlin.com/linux/v5.14-rc1/source/drivers/net/phy/phy_device.c#L2797
> 
> The extra ifdef in the PHY driver only saves some code in the HY
> driver, but it should still work as before on systems without
> CONFIG_OF_MDIO.
> 
> I would also prefer to remove the ifdef from the intel-xway phy driver.
> 
> Hauke

OK, so I'll remove the ifdef from the driver.


      reply	other threads:[~2021-07-19  9:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-09 16:42 [PATCH net-next v3] net: phy: intel-xway: Add RGMII internal delay configuration Martin Schiller
2021-07-09 18:31 ` Martin Blumenstingl
2021-07-12  6:13   ` Martin Schiller
2021-07-13 13:06     ` Andrew Lunn
2021-07-17 16:38       ` Hauke Mehrtens
2021-07-19  8:14         ` Martin Schiller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42d639692238c4c89fdbca1e0b2b27cd@dev.tdt.de \
    --to=ms@dev.tdt.de \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=hauke@hauke-m.de \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).