[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YO2P8J4Ln+RwxkfO@lunn.ch>
Date: Tue, 13 Jul 2021 15:06:56 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Martin Schiller <ms@....tdt.de>
Cc: Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
Hauke Mehrtens <hauke@...ke-m.de>, f.fainelli@...il.com,
hkallweit1@...il.com, linux@...linux.org.uk, davem@...emloft.net,
kuba@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v3] net: phy: intel-xway: Add RGMII internal
delay configuration
> > [...]
> > > +#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
Powered by blists - more mailing lists