On Thu, Feb 26, 2026 at 04:13:59PM +0100, Geert Uytterhoeven wrote:
> Hi Vladimir,
> 
> On Thu, 26 Feb 2026 at 16:10, Vladimir Oltean <[email protected]> wrote:
> > On Thu, Feb 26, 2026 at 02:22:29PM +0100, Geert Uytterhoeven wrote:
> > > > +config PHY_COMMON_PROPS
> > > > +       bool
> > > > +       help
> > > > +         This parses properties common between generic PHYs and 
> > > > Ethernet PHYs.
> > > > +
> > > > +         Select this from consumer drivers to gain access to helpers 
> > > > for
> > > > +         parsing properties from the
> > > > +         Documentation/devicetree/bindings/phy/phy-common-props.yaml 
> > > > schema.
> > > > +
> > > > +config PHY_COMMON_PROPS_TEST
> > > > +       tristate "KUnit tests for PHY common props" if !KUNIT_ALL_TESTS
> > > > +       select PHY_COMMON_PROPS
> > >
> > > This select means that enabling KUNIT_ALL_TESTS also enables extra
> > > functionality, which may not be desirable in a production system.
> > > As PHY_COMMON_PROPS is bool, this extra functionality is even part of
> > > the base kernel if KUNIT_ALL_TESTS=m.  Unfortunately PHY_COMMON_PROPS is
> > > invisible, so this cannot just be changed from "select" to "depends on".
> > > But perhaps PHY_COMMON_PROPS can be made visible if KUNIT_ALL_TESTS,
> > > so the select can be turned into a dependency?
> >
> > Is this what you're asking for?
> >
> > -- >8 --
> > diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
> > index 02467dfd4fb0..1875d5b784f6 100644
> > --- a/drivers/phy/Kconfig
> > +++ b/drivers/phy/Kconfig
> > @@ -6,7 +6,7 @@
> >  menu "PHY Subsystem"
> >
> >  config PHY_COMMON_PROPS
> > -       bool
> > +       bool "PHY common properties" if KUNIT_ALL_TESTS
> >         help
> >           This parses properties common between generic PHYs and Ethernet 
> > PHYs.
> >
> > @@ -16,8 +16,7 @@ config PHY_COMMON_PROPS
> >
> >  config PHY_COMMON_PROPS_TEST
> >         tristate "KUnit tests for PHY common props" if !KUNIT_ALL_TESTS
> > -       select PHY_COMMON_PROPS
> > -       depends on KUNIT
> > +       depends on KUNIT && PHY_COMMON_PROPS
> >         default KUNIT_ALL_TESTS
> >         help
> >           This builds KUnit tests for the PHY common property API.
> > -- >8 --
> 
> Yes, that would work.  Do you think it is acceptable?
> Thanks!

Yes, I think it's fine. I misinterpreted what kunit_"all"_tests means,
then read its prompt which says "All KUnit tests with satisfied dependencies".

I'll send a patch.

Reply via email to