diff mbox series

streamline_config.pl: handle also ${CONFIG_FOO}

Message ID 20230607061417.13636-1-jirislaby@kernel.org (mailing list archive)
State New, archived
Headers show
Series streamline_config.pl: handle also ${CONFIG_FOO} | expand

Commit Message

Jiri Slaby June 7, 2023, 6:14 a.m. UTC
From: Jiri Slaby <jslaby@suse.cz>

streamline_config.pl currently searches for CONFIG options in Kconfig
files as $(CONFIG_FOO). But some Kconfigs (e.g. thunderbolt) use
${CONFIG_FOO}. So fix up the regex to accept both.

This fixes:
$ make LSMOD=`pwd/`/lsmod localmodconfig
using config: '.config'
thunderbolt config not found!!

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: andreas.noever@gmail.com
Cc: michael.jamet@intel.com
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: YehezkelShB@gmail.com
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
---
 scripts/kconfig/streamline_config.pl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mika Westerberg June 7, 2023, 6:47 a.m. UTC | #1
On Wed, Jun 07, 2023 at 08:14:17AM +0200, Jiri Slaby (SUSE) wrote:
> From: Jiri Slaby <jslaby@suse.cz>
> 
> streamline_config.pl currently searches for CONFIG options in Kconfig
> files as $(CONFIG_FOO). But some Kconfigs (e.g. thunderbolt) use
> ${CONFIG_FOO}. So fix up the regex to accept both.
> 
> This fixes:
> $ make LSMOD=`pwd/`/lsmod localmodconfig
> using config: '.config'
> thunderbolt config not found!!
> 
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: andreas.noever@gmail.com
> Cc: michael.jamet@intel.com
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Masahiro Yamada June 7, 2023, 12:22 p.m. UTC | #2
On Wed, Jun 7, 2023 at 3:14 PM Jiri Slaby (SUSE) <jirislaby@kernel.org> wrote:
>
> From: Jiri Slaby <jslaby@suse.cz>
>
> streamline_config.pl currently searches for CONFIG options in Kconfig
> files as $(CONFIG_FOO). But some Kconfigs (e.g. thunderbolt) use
> ${CONFIG_FOO}. So fix up the regex to accept both.
>
> This fixes:
> $ make LSMOD=`pwd/`/lsmod localmodconfig
> using config: '.config'
> thunderbolt config not found!!
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> Cc: andreas.noever@gmail.com
> Cc: michael.jamet@intel.com
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: YehezkelShB@gmail.com
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
> ---


Applied to linux-kbuild.
Thanks.
Steven Rostedt June 7, 2023, 2:49 p.m. UTC | #3
On Wed, 7 Jun 2023 21:22:47 +0900
Masahiro Yamada <masahiroy@kernel.org> wrote:

> On Wed, Jun 7, 2023 at 3:14 PM Jiri Slaby (SUSE) <jirislaby@kernel.org> wrote:
> >
> > From: Jiri Slaby <jslaby@suse.cz>
> >
> > streamline_config.pl currently searches for CONFIG options in Kconfig
> > files as $(CONFIG_FOO). But some Kconfigs (e.g. thunderbolt) use
> > ${CONFIG_FOO}. So fix up the regex to accept both.
> >
> > This fixes:
> > $ make LSMOD=`pwd/`/lsmod localmodconfig
> > using config: '.config'
> > thunderbolt config not found!!
> >
> > Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> > Cc: andreas.noever@gmail.com
> > Cc: michael.jamet@intel.com
> > Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> > Cc: YehezkelShB@gmail.com
> > Cc: Steven Rostedt <rostedt@goodmis.org>
> > Cc: Linux Kbuild mailing list <linux-kbuild@vger.kernel.org>
> > ---  

I believe I acked this change back here:

  https://lore.kernel.org/all/20230513192821.34ca93fd@rorschach.local.home/

But again:

  Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-- Steve
diff mbox series

Patch

diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl
index 3387ad7508f7..d51cd7ac15d2 100755
--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -317,7 +317,7 @@  foreach my $makefile (@makefiles) {
 	$_ = convert_vars($_, %make_vars);
 
 	# collect objects after obj-$(CONFIG_FOO_BAR)
-	if (/obj-\$\((CONFIG_[^\)]*)\)\s*[+:]?=\s*(.*)/) {
+	if (/obj-\$[({](CONFIG_[^})]*)[)}]\s*[+:]?=\s*(.*)/) {
 	    $var = $1;
 	    $objs = $2;