Re: [PATCH] powerpc: Remove inaccessible CMDLINE default

From: Chris Packham
Date: Sun Aug 04 2019 - 16:32:47 EST


On Fri, 2019-08-02 at 07:18 +0200, Christophe Leroy wrote:
>
> Le 02/08/2019 Ã 07:02, Chris Packham a ÃcritÂ:
> >
> > Since commit cbe46bd4f510 ("powerpc: remove CONFIG_CMDLINE #ifdef
> > mess")
> > CONFIG_CMDLINE has always had a value regardless of
> > CONNIG_CMDLINE_BOOL.
> s/CONNIG/CONFIG/
>
> >
> >
> > For example:
> >
> > Â $ make ARCH=powerpc defconfig
> > Â $ cat .config
> > Â # CONFIG_CMDLINE_BOOL is not set
> > Â CONFIG_CMDLINE=""
> >
> > When enabling CONNIG_CMDLINE_BOOL this value is kept making the
> > 'default
> > "..." if CONNIG_CMDLINE_BOOL' ineffective.
> s/CONNIG/CONFIG/
>

Will fix in v2.

> >
> >
> > Â $ ./scripts/config --enable CONFIG_CMDLINE_BOOL
> > Â $ cat .config
> > Â CONFIG_CMDLINE_BOOL=y
> > Â CONFIG_CMDLINE=""
> >
> > Additionally all the in-tree powerpc defconfigs that set
> > CONFIG_CMDLINE_BOOL=y also set CONFIG_CMDLINE to something else.
> > For
> > these reasons remove the inaccessible default.
> >
> > Signed-off-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
> Reviewed-by: Christophe Leroy <christophe.leroy@xxxxxx>
>
> >
> > ---
> > This should be independent of http://patchwork.ozlabs.org/patch/114
> > 0811/ but
> > I've generated this patch on a stream that has it applied locally.
> >
> > Â arch/powerpc/Kconfig | 1 -
> > Â 1 file changed, 1 deletion(-)
> >
> > diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> > index d413fe1b4058..6fca6eba6aee 100644
> > --- a/arch/powerpc/Kconfig
> > +++ b/arch/powerpc/Kconfig
> > @@ -844,7 +844,6 @@ config CMDLINE_BOOL
> > ÂÂ
> > Â config CMDLINE
> > ÂÂ string "Initial kernel command string" if CMDLINE_BOOL
> > - default "console=ttyS0,9600 console=tty0 root=/dev/sda2"
> > if CMDLINE_BOOL
> > ÂÂ default ""
> > ÂÂ help
> > ÂÂ ÂÂOn some platforms, there is currently no way for the
> > boot loader to
> >
> I think we could also get rid of CMDLINE_BOOL totally and use CMDLINE
> !=Â
> "" instead.

The only reason I can see to keep CMDLINE_BOOL is that it hides the
text input forÂCMDLINE which seems to be a pattern in Kconfig. Happy to
remove it if that's the consensus.Â

I'll wait for the dust to settle on my other patch before sending a v2
of this one.

>
> Christophe