Re: [PATCH 4/5] kconfig: Introduce "showif" to factor out conditions on visibility

From: Paul Bolle
Date: Thu May 28 2015 - 10:58:05 EST


On Wed, 2015-05-20 at 11:30 -0700, josh@xxxxxxxxxxxxxxxx wrote:
> In net/rfkill/Kconfig, RFKILL_REGULATOR oddly has
> "depends on RFKILL || !RFKILL". WIMAX does the same thing.

That's only tristate logic. It's a common idiom, but it looks very odd
compared to boolean logic. It ensures RFKILL_REGULATOR will not be 'y'
if RFKILL is 'm'. Because:
RFKILL = 'n' => RFKILL_REGULATOR = 'n' || 'm' || 'y'
RFKILL = 'm' => RFKILL_REGULATOR = 'n' || 'm'
RFKILL = 'y' => RFKILL_REGULATOR = 'n' || 'm' || 'y'

Hope this helps,


Paul Bolle

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/