lkml.org 
[lkml]   [2015]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Kconfig: drop bogus default values
>>> On 23.03.15 at 23:58, <walch.martin@web.de> wrote:
> On Monday 23 March 2015 22:24:28 Paul Bolle wrote:
>> > 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.
>>
>> Good catch!
>>
>> For the same effect, would it do to have
>> config PCI_QUIRKS
>> default y if !S390
>> [...]
>>
>> in init/Kconfig?
>
> Basically yes (although I suppose the maintainer had a good reason for
> writing it the way it is now). But in the case with "def_bool n" in
> arch/s390/Kconfig, the default value is explicitly set to n, while
> "default y if !S390" does not set the value at all. As long as there are no
> further default lines for PCI_QUIRKS below, this leads to the same
> configuration. However if there was a third default line, then in the former
> case that third default value would be always ignored while in the latter
> case it would determine the default value on s390.

If the "n" default was really needed, it could be

config PCI_QUIRKS
default !S390

Jan



\
 
 \ /
  Last update: 2015-03-24 09:01    [W:0.035 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site