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

From: Jason Gunthorpe
Date: Thu Apr 23 2020 - 14:30:59 EST


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.

Jason