[PATCH v2] Documentation/kbuild: Document the kconfig choice default value

From: Robert Richter
Date: Mon Jul 19 2021 - 05:16:15 EST


On 18.07.21 18:36:31, Masahiro Yamada wrote:
> On Thu, Jul 15, 2021 at 6:26 PM Robert Richter <rrichter@xxxxxxx> wrote:

> > --- a/Documentation/kbuild/kconfig-language.rst
> > +++ b/Documentation/kbuild/kconfig-language.rst
> > @@ -417,6 +417,9 @@ definitions of that choice. If a [symbol] is associated to the choice,
> > then you may define the same choice (i.e. with the same entries) in another
> > place.
> >
> > +The default value of a choice is set to the first visible choice element.
>
>
> The default value of a choice is set to the first visible choice element
> unless it is explicitly set by the 'default' property.
>
> ... is more precise.

Ah, ok. It becomes clear now, but how a value is set then in case the
type is tristate?

>
>
>
>
> > +Choice elements do not support the default attribute like menu entries do.
>
> I doubt this info is useful.
> Rather, is it even confusing?
>
>
> choices support 'default' but
> choice elements (i.e. choice values) do not.

I have added an example to the doc for clarification, v2 below.

Thanks,

-Robert