From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754187AbbE1O6A (ORCPT ); Thu, 28 May 2015 10:58:00 -0400 Received: from lb3-smtp-cloud3.xs4all.net ([194.109.24.30]:45424 "EHLO lb3-smtp-cloud3.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754159AbbE1O5u (ORCPT ); Thu, 28 May 2015 10:57:50 -0400 Message-ID: <1432825060.8508.57.camel@x220> Subject: Re: [PATCH 4/5] kconfig: Introduce "showif" to factor out conditions on visibility From: Paul Bolle To: josh@joshtriplett.org Cc: Ingo Molnar , Andrew Morton , "Paul E. McKenney" , Michal Hocko , Vladimir Davydov , Johannes Weiner , Geert Uytterhoeven , Andy Lutomirski , Bertrand Jacquin , "Luis R. Rodriguez" , Iulia Manda , Pranith Kumar , Clark Williams , Mel Gorman , Randy Dunlap , Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 28 May 2015 16:57:40 +0200 In-Reply-To: <20150520183042.GA5720@cloud> References: <760264ebf529ba3b0aa007144e2862bc73807dad.1431589089.git.josh@joshtriplett.org> <1432116013.21715.82.camel@x220> <20150520183042.GA5720@cloud> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2015-05-20 at 11:30 -0700, josh@joshtriplett.org 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