* kbuild: default n removals? (was: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework)
[not found] ` <5758358A.602@mentor.com>
@ 2016-06-08 15:38 ` Joe Perches
2016-06-08 18:05 ` Guenter Roeck
2016-06-15 10:02 ` kbuild: default n removals? Michal Marek
0 siblings, 2 replies; 3+ messages in thread
From: Joe Perches @ 2016-06-08 15:38 UTC (permalink / raw)
To: Vladimir Zapolskiy, Guenter Roeck, Michal Marek
Cc: Wim Van Sebroeck, Wolfram Sang, Robin Gong, linux-watchdog,
linux-kernel, linux-kbuild
(Adding Michal Marek and linux-kbuild)
On Wed, 2016-06-08 at 18:11 +0300, Vladimir Zapolskiy wrote:
> On 08.06.2016 16:53, Guenter Roeck wrote:
> > On 06/08/2016 06:37 AM, Vladimir Zapolskiy wrote:
> > > > > +comment "Watchdog Pretimeout Governors"
> > > > > +
> > > > > +config WATCHDOG_PRETIMEOUT_GOV
> > > > > + bool "Enable watchdog pretimeout governors"
> > > > > + default n
> > > > I don't think 'default n" is needed.
> > > >
> > > No strict objections, but probably 'default n' may save quite many
> > > lines in defconfigs.
> > >
> > I always wondered why it would be necessary to say "default n".
> > What is the difference between "default n" and no explicit default ?
> >
> I pointed out that it may have impact on defconfig, but experimentally
> it has no effect.
>
> Users of "make oldconfig" get a prompt in both cases as well.
>
> Also I haven't found any difference for silentoldconfig, olddefconfig
> and alldefconfig, I assume explicit "default n" and "def_bool n"
> can be safely dropped.
It's not completely clear removals are always appropriate.
from: Documentation/kbuild/kconfig-language.txt:
------------------------------------------------------------------
- default value: "default" <expr> ["if" <expr>]
A config option can have any number of default values. If multiple
default values are visible, only the first defined one is active.
Default values are not limited to the menu entry where they are
defined. This means the default can be defined somewhere else or be
overridden by an earlier definition.
The default value is only assigned to the config symbol if no other
value was set by the user (via the input prompt above). If an input
prompt is visible the default value is presented to the user and can
be overridden by him.
Optionally, dependencies only for this default value can be added with
"if".
------------------------------------------------------------------
Michal? Do you have an opinion or clarification?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kbuild: default n removals? (was: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework)
2016-06-08 15:38 ` kbuild: default n removals? (was: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework) Joe Perches
@ 2016-06-08 18:05 ` Guenter Roeck
2016-06-15 10:02 ` kbuild: default n removals? Michal Marek
1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2016-06-08 18:05 UTC (permalink / raw)
To: Joe Perches
Cc: Vladimir Zapolskiy, Michal Marek, Wim Van Sebroeck, Wolfram Sang,
Robin Gong, linux-watchdog, linux-kernel, linux-kbuild
On Wed, Jun 08, 2016 at 08:38:52AM -0700, Joe Perches wrote:
> (Adding Michal Marek and linux-kbuild)
>
> On Wed, 2016-06-08 at 18:11 +0300, Vladimir Zapolskiy wrote:
> > On 08.06.2016 16:53, Guenter Roeck wrote:
> > > On 06/08/2016 06:37 AM, Vladimir Zapolskiy wrote:
> > > > > > +comment "Watchdog Pretimeout Governors"
> > > > > > +
> > > > > > +config WATCHDOG_PRETIMEOUT_GOV
> > > > > > + bool "Enable watchdog pretimeout governors"
> > > > > > + default n
> > > > > I don't think 'default n" is needed.
> > > > >
> > > > No strict objections, but probably 'default n' may save quite many
> > > > lines in defconfigs.
> > > >
> > > I always wondered why it would be necessary to say "default n".
> > > What is the difference between "default n" and no explicit default ?
> > >
> > I pointed out that it may have impact on defconfig, but experimentally
> > it has no effect.
> >
> > Users of "make oldconfig" get a prompt in both cases as well.
> >
> > Also I haven't found any difference for silentoldconfig, olddefconfig
> > and alldefconfig, I assume explicit "default n" and "def_bool n"
> > can be safely dropped.
>
> It's not completely clear removals are always appropriate.
>
> from: Documentation/kbuild/kconfig-language.txt:
> ------------------------------------------------------------------
> - default value: "default" <expr> ["if" <expr>]
> A config option can have any number of default values. If multiple
> default values are visible, only the first defined one is active.
> Default values are not limited to the menu entry where they are
> defined. This means the default can be defined somewhere else or be
> overridden by an earlier definition.
> The default value is only assigned to the config symbol if no other
> value was set by the user (via the input prompt above). If an input
> prompt is visible the default value is presented to the user and can
> be overridden by him.
> Optionally, dependencies only for this default value can be added with
> "if".
This describes default settings such as
default n if <expr>
default y
which would set the default to y unless <expr> is true.
Question here was about the stand-alone "default n" which always
perplexed me.
Guenter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: kbuild: default n removals?
2016-06-08 15:38 ` kbuild: default n removals? (was: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework) Joe Perches
2016-06-08 18:05 ` Guenter Roeck
@ 2016-06-15 10:02 ` Michal Marek
1 sibling, 0 replies; 3+ messages in thread
From: Michal Marek @ 2016-06-15 10:02 UTC (permalink / raw)
To: Joe Perches
Cc: Vladimir Zapolskiy, Guenter Roeck, Wim Van Sebroeck, Wolfram Sang,
Robin Gong, linux-watchdog, linux-kernel, linux-kbuild
On 2016-06-08 17:38, Joe Perches wrote:
> (Adding Michal Marek and linux-kbuild)
>
> On Wed, 2016-06-08 at 18:11 +0300, Vladimir Zapolskiy wrote:
>> On 08.06.2016 16:53, Guenter Roeck wrote:
>>> On 06/08/2016 06:37 AM, Vladimir Zapolskiy wrote:
>>>>>> +comment "Watchdog Pretimeout Governors"
>>>>>> +
>>>>>> +config WATCHDOG_PRETIMEOUT_GOV
>>>>>> + bool "Enable watchdog pretimeout governors"
>>>>>> + default n
>>>>> I don't think 'default n" is needed.
>>>>>
>>>> No strict objections, but probably 'default n' may save quite many
>>>> lines in defconfigs.
>>>>
>>> I always wondered why it would be necessary to say "default n".
>>> What is the difference between "default n" and no explicit default ?
>>>
>> I pointed out that it may have impact on defconfig, but experimentally
>> it has no effect.
>>
>> Users of "make oldconfig" get a prompt in both cases as well.
>>
>> Also I haven't found any difference for silentoldconfig, olddefconfig
>> and alldefconfig, I assume explicit "default n" and "def_bool n"
>> can be safely dropped.
Yes, 'default n' is a noop.
> It's not completely clear removals are always appropriate.
>
> from: Documentation/kbuild/kconfig-language.txt:
> ------------------------------------------------------------------
> - default value: "default" <expr> ["if" <expr>]
> A config option can have any number of default values. If multiple
> default values are visible, only the first defined one is active.
> Default values are not limited to the menu entry where they are
> defined. This means the default can be defined somewhere else or be
> overridden by an earlier definition.
> The default value is only assigned to the config symbol if no other
> value was set by the user (via the input prompt above). If an input
> prompt is visible the default value is presented to the user and can
> be overridden by him.
> Optionally, dependencies only for this default value can be added with
> "if".
> ------------------------------------------------------------------
>
> Michal? Do you have an opinion or clarification?
As Guenter explained, there can be multiple default statements with
different if conditions. The first statement to match applies.
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-06-15 10:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1465321127-19522-1-git-send-email-vladimir_zapolskiy@mentor.com>
[not found] ` <1465321127-19522-5-git-send-email-vladimir_zapolskiy@mentor.com>
[not found] ` <20160607214309.GA17129@roeck-us.net>
[not found] ` <57581FB2.10806@mentor.com>
[not found] ` <57582363.8050406@roeck-us.net>
[not found] ` <5758358A.602@mentor.com>
2016-06-08 15:38 ` kbuild: default n removals? (was: Re: [PATCH v3 4/6] watchdog: add watchdog pretimeout framework) Joe Perches
2016-06-08 18:05 ` Guenter Roeck
2016-06-15 10:02 ` kbuild: default n removals? Michal Marek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox