Re: [PATCH] Kconfig: drop bogus default values

From: Jan Beulich
Date: Tue Mar 24 2015 - 03:38:42 EST


>>> On 23.03.15 at 22:08, <walch.martin@xxxxxx> wrote:
> 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.

But iirc such redundant defaults yield warnings (or at least at
some point in the past they did).

Jan

--
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/