Re: [PATCH] logfs: clarify MTD dependency

From: Michal Marek
Date: Fri Nov 27 2015 - 09:14:12 EST


On Fri, Nov 27, 2015 at 02:54:53PM +0100, Arnd Bergmann wrote:
> After a change to the way that composite modules work, we get
> a logfs build error:
>
> fs/built-in.o: In function `logfs_mount':
> :(.text+0x139d34): undefined reference to `logfs_get_sb_mtd'
> fs/built-in.o: In function `logfs_get_sb_bdev':
> :(.text+0x13aa08): undefined reference to `logfs_get_sb_mtd'
>
> This patch avoids the error by changing the dependencies of
> logfs in a way that we can no longer configure logfs as built-in
> when the MTD core is a loadable module, while leaving the
> dependency to require at least one of MTD or BLOCK to be
> enabled.

Hi Arnd,

I hit this as well and was about to submit a slightly different fix. Can
you try the logfs portion of the below patch? Proper changelog is to be
done, but the gist of the patch is that IS_REACHABLE(CONFIG_FOO)
evaluates to 1 if CONFIG_FOO=y or we are building a module and
CONFIG_FOO=m.

Michal