Re: [RFC PATCH 1/2] Kconfig: Introduce "uses" keyword

From: Nicolas Pitre
Date: Thu Apr 23 2020 - 14:52:26 EST


On Thu, 23 Apr 2020, Jason Gunthorpe wrote:

> On Thu, Apr 23, 2020 at 11:33:33AM -0400, Nicolas Pitre wrote:
> > > > No. There is no logic in restricting MTD usage based on CRAMFS or
> > > > CRAMFS_MTD.
> > >
> > > Ah, I got it backwards, maybe this:
> > >
> > > config CRAMFS
> > > depends on MTD if CRAMFS_MTD
> > >
> > > ?
> >
> > Still half-backward. CRAMFS should not depend on either MTD nor
> > CRAMFS_MTD.
>
> Well, I would view this the same as all the other cases.. the CRAMFS
> module has an optional ability consume symbols from MTD. Here that is
> controlled by another 'CRAMFS_MTD' selection, but it should still
> settle it out the same way as other cases like this - ie CRAMFS is
> restricted to m if MTD is m
>
> Arnd's point that kconfig is acyclic does kill it though :(
>
> > It is CRAMFS_MTD that needs both CRAMFS and MTD.
> > Furthermore CRAMFS_MTD can't be built-in if MTD is modular.
>
> CRAMFS_MTD is a bool feature flag for the CRAMFS tristate - it is
> CRAMFS that can't be built in if MTD is modular.

Not exactly. CRAMFS still can be built irrespective of MTD. It is only
the XIP part of CRAMFS relying on MTD that is restricted.


Nicolas