[v2] localmodconfig: Fix whitespace repeat count after "tristate"
diff mbox

Message ID 1461696998-3953-1-git-send-email-bpoirier@suse.com
State New
Headers show

Commit Message

Benjamin Poirier April 26, 2016, 6:56 p.m. UTC
Also recognize standalone "prompt".

Before this patch we incorrectly identified some symbols as not having a
prompt and potentially needing to be selected by something else.

Note that this patch could theoretically change the resulting .config,
causing it to have fewer symbols turned on. However, given the current set
of Kconfig files, this situation does not occur because the symbols newly
added to %prompts are absent from %selects.

Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
---
 scripts/kconfig/streamline_config.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Steven Rostedt April 26, 2016, 7:51 p.m. UTC | #1
On Tue, 26 Apr 2016 11:56:38 -0700
Benjamin Poirier <bpoirier@suse.com> wrote:

> Also recognize standalone "prompt".
> 
> Before this patch we incorrectly identified some symbols as not having a
> prompt and potentially needing to be selected by something else.
> 
> Note that this patch could theoretically change the resulting .config,
> causing it to have fewer symbols turned on. However, given the current set
> of Kconfig files, this situation does not occur because the symbols newly
> added to %prompts are absent from %selects.
> 
> Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
> ---
>  scripts/kconfig/streamline_config.pl | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> index 95a6f2b..b8c7b29 100755
> --- a/scripts/kconfig/streamline_config.pl
> +++ b/scripts/kconfig/streamline_config.pl
> @@ -237,7 +237,7 @@ sub read_kconfig {
>  	    }
>  
>  	# configs without prompts must be selected
> -	} elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
> +	} elsif ($state ne "NONE" && /^\s*(tristate\s+\S|prompt\b)/) {

I prefer not to have the "prompt" here. I'm only interested in module
configs. But the \s to \s+ is a real fix.

Can you resend?

-- Steve

>  	    # note if the config has a prompt
>  	    $prompts{$config} = 1;
>  

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Benjamin Poirier April 26, 2016, 9:35 p.m. UTC | #2
On 2016/04/26 15:51, Steven Rostedt wrote:
> On Tue, 26 Apr 2016 11:56:38 -0700
> Benjamin Poirier <bpoirier@suse.com> wrote:
> 
> > Also recognize standalone "prompt".
> > 
> > Before this patch we incorrectly identified some symbols as not having a
> > prompt and potentially needing to be selected by something else.
> > 
> > Note that this patch could theoretically change the resulting .config,
> > causing it to have fewer symbols turned on. However, given the current set
> > of Kconfig files, this situation does not occur because the symbols newly
> > added to %prompts are absent from %selects.
> > 
> > Signed-off-by: Benjamin Poirier <bpoirier@suse.com>
> > ---
> >  scripts/kconfig/streamline_config.pl | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
> > index 95a6f2b..b8c7b29 100755
> > --- a/scripts/kconfig/streamline_config.pl
> > +++ b/scripts/kconfig/streamline_config.pl
> > @@ -237,7 +237,7 @@ sub read_kconfig {
> >  	    }
> >  
> >  	# configs without prompts must be selected
> > -	} elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
> > +	} elsif ($state ne "NONE" && /^\s*(tristate\s+\S|prompt\b)/) {
> 
> I prefer not to have the "prompt" here. I'm only interested in module
> configs. But the \s to \s+ is a real fix.

Separate tristate and prompt statements are allowed and recognized by
the kconfig parser. Although there are no such cases now, there used to
be one: 0a57274
You sure you want to remove it from the regexp?
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Steven Rostedt April 26, 2016, 10:34 p.m. UTC | #3
On Tue, 26 Apr 2016 14:35:19 -0700
Benjamin Poirier <bpoirier@suse.com> wrote:

> Separate tristate and prompt statements are allowed and recognized by
> the kconfig parser. Although there are no such cases now, there used to
> be one: 0a57274
> You sure you want to remove it from the regexp?

Hmm, OK, I'll take your patch as is.

Thanks,

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 95a6f2b..b8c7b29 100755
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -237,7 +237,7 @@  sub read_kconfig {
 	    }
 
 	# configs without prompts must be selected
-	} elsif ($state ne "NONE" && /^\s*tristate\s\S/) {
+	} elsif ($state ne "NONE" && /^\s*(tristate\s+\S|prompt\b)/) {
 	    # note if the config has a prompt
 	    $prompts{$config} = 1;