diff mbox series

powerpc: Remove inaccessible CMDLINE default

Message ID 20190802050232.22978-1-chris.packham@alliedtelesis.co.nz (mailing list archive)
State Superseded
Headers show
Series powerpc: Remove inaccessible CMDLINE default | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch next (f3365d1a959d5c6527efe3d38276acc9b58e3f3f)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 success Build succeeded
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked

Commit Message

Chris Packham Aug. 2, 2019, 5:02 a.m. UTC
Since commit cbe46bd4f510 ("powerpc: remove CONFIG_CMDLINE #ifdef mess")
CONFIG_CMDLINE has always had a value regardless of CONNIG_CMDLINE_BOOL.

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.

 $ ./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@alliedtelesis.co.nz>
---
This should be independent of http://patchwork.ozlabs.org/patch/1140811/ but
I've generated this patch on a stream that has it applied locally.

 arch/powerpc/Kconfig | 1 -
 1 file changed, 1 deletion(-)

Comments

Christophe Leroy Aug. 2, 2019, 5:18 a.m. UTC | #1
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/

> 
>   $ ./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@alliedtelesis.co.nz>

Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>

> ---
> This should be independent of http://patchwork.ozlabs.org/patch/1140811/ 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.

Christophe
Chris Packham Aug. 4, 2019, 8:32 p.m. UTC | #2
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@alliedtelesis.co.nz>
> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
> 
> > 
> > ---
> > 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
diff mbox series

Patch

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