From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186AbbCWVIs (ORCPT ); Mon, 23 Mar 2015 17:08:48 -0400 Received: from mout.web.de ([212.227.15.4]:52395 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752728AbbCWVIr (ORCPT ); Mon, 23 Mar 2015 17:08:47 -0400 From: Martin Walch To: Paul Bolle Cc: Jan Beulich , akpm@linux-foundation.org, Michal Marek , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Sam Ravnborg Subject: Re: [PATCH] Kconfig: drop bogus default values Date: Mon, 23 Mar 2015 22:08:24 +0100 Message-ID: <178407860.0zoJnDfCo1@tacticalops> User-Agent: KMail/4.14.6 (Linux/3.18.9-gentoo; KDE/4.14.6; x86_64; ; ) In-Reply-To: <1426162307.5304.41.camel@x220> References: <5500584D02000078000688F5@mail.emea.novell.com> <1426162307.5304.41.camel@x220> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K0:bUKsYgWzlub65NeMwdZ1Zep0iLuo9OPuosXi1qVDVeo0X7mVQAP 7er0ojS4XHkKMIS9kjZuzWo/0DzukL+5wNUDk2xF7yNHBp2Xf3uUMyOpeHCdKcXHLwXfeNr JWNC3Sq6PtAGdlrZEyUciZRrHZk3afPSJfR7KLBmecwvW+R6ala9s4DSbnVEZAoK+4nKiOM gOLX9Tuxxpe9wTlDM4iVg== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 12 March 2015 13:11:47 Paul Bolle wrote: > On Wed, 2015-03-11 at 13:59 +0000, Jan Beulich wrote: > > Default "no" is pretty pointless for options without (visible) prompts: > > Related: is there ever a situation where using "default n" or "def_bool > n" makes sense (whether or not the entry has a prompt)? I think I once > thought of one but I can't remember it at all, so I guess my memory is > fooling me. Your memory is right. It is rarely used, but there is an application for using a plain "default n": to overwrite an existing other default value. Particularly in one special case this is desired: Let us say there is a symbol that may lack a visible prompt, but has the default value y set in a Kconfig file that is used across all architectures. If there is a single architecture that must have the default value n then it is possible to override the default y in the global file with a default n in the architecture specific file. A real world case is PCI_QUIRKS in the mainline kernel: init/Kconfig:1554: default y arch/s390/Kconfig:59: def_bool n When setting PCI!=n && EXPERT=n then on each architecture PCI_QUIRKS=y except on s390 where PCI_QUIRKS=n. Regards, Martin Walch --