diff mbox

[4/4] localmodconfig: Recognize standalone "prompt"

Message ID 1460333193-16361-4-git-send-email-bpoirier@suse.com (mailing list archive)
State New, archived
Headers show

Commit Message

Benjamin Poirier April 11, 2016, 12:06 a.m. UTC
Note that this may change the resulting .config, causing it to have fewer
symbols turned on. Before this patch we incorrectly identified some symbols
as not having a prompt and needing to be selected by something else.

Also fix the whitespace repeat after "tristate".

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, 3:11 p.m. UTC | #1
On Sun, 10 Apr 2016 17:06:33 -0700
Benjamin Poirier <bpoirier@suse.com> wrote:

> Note that this may change the resulting .config, causing it to have fewer
> symbols turned on. Before this patch we incorrectly identified some symbols
> as not having a prompt and needing to be selected by something else.
> 
> Also fix the whitespace repeat after "tristate".
> 
> 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 bbc160c..d465672 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'm curious. What modules have tristate and a specified prompt?

That is, what modules are removed with this patch?

I applied the first three so far.

Thanks,

-- 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, 6:54 p.m. UTC | #2
On 2016/04/26 11:11, Steven Rostedt wrote:
> On Sun, 10 Apr 2016 17:06:33 -0700
> Benjamin Poirier <bpoirier@suse.com> wrote:
> 
> > Note that this may change the resulting .config, causing it to have fewer
> > symbols turned on. Before this patch we incorrectly identified some symbols
> > as not having a prompt and needing to be selected by something else.
> > 
> > Also fix the whitespace repeat after "tristate".
> > 
> > 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 bbc160c..d465672 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'm curious. What modules have tristate and a specified prompt?

Actually, I didn't find config symbols that are tristate and have a separate
prompt. However, the following tristate symbols were not recognized by the
original expression because they are defined with two spaces between
"tristate" and the prompt string (sigh):
	IP6_NF_RAW
	IP_NF_RAW
	NETFILTER_XT_MATCH_COMMENT
	NETFILTER_XT_MATCH_CONNBYTES
	NETFILTER_XT_MATCH_CONNMARK
	NETFILTER_XT_MATCH_REALM
	NETFILTER_XT_MATCH_SCTP
	NETFILTER_XT_MATCH_STRING
	NETFILTER_XT_TARGET_CONNMARK
	NETFILTER_XT_TARGET_IDLETIMER
	NETFILTER_XT_TARGET_NOTRACK
	NETFILTER_XT_TARGET_TRACE
	NF_CT_NETLINK_TIMEOUT
	USB_EHCI_HCD_AT91
	USB_EHCI_HCD_ORION

So they were not added to %prompts and now they are.

> 
> That is, what modules are removed with this patch?
> 

None, it turns out. Because it is the case that none of the above symbols are
selected by other symbols; the second condition in
	    if (!defined($prompts{$config}) && defined($selects{$config})) {
		$process_selects{$config} = 1;
	    }
is always false for these symbols.

I've updated the patch subject and log accordingly.
--
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
diff mbox

Patch

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index bbc160c..d465672 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;