2023-06-07 06:27:31

by Jiri Slaby

[permalink] [raw]
Subject: [PATCH] streamline_config.pl: handle also ${CONFIG_FOO}

From: Jiri Slaby <[email protected]>

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 <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Mika Westerberg <[email protected]>
Cc: [email protected]
Cc: Steven Rostedt <[email protected]>
Cc: Linux Kbuild mailing list <[email protected]>
---
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 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;

--
2.41.0



2023-06-07 07:10:52

by Mika Westerberg

[permalink] [raw]
Subject: Re: [PATCH] streamline_config.pl: handle also ${CONFIG_FOO}

On Wed, Jun 07, 2023 at 08:14:17AM +0200, Jiri Slaby (SUSE) wrote:
> From: Jiri Slaby <[email protected]>
>
> 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 <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Mika Westerberg <[email protected]>

Reviewed-by: Mika Westerberg <[email protected]>

2023-06-07 12:34:18

by Masahiro Yamada

[permalink] [raw]
Subject: Re: [PATCH] streamline_config.pl: handle also ${CONFIG_FOO}

On Wed, Jun 7, 2023 at 3:14 PM Jiri Slaby (SUSE) <[email protected]> wrote:
>
> From: Jiri Slaby <[email protected]>
>
> 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 <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Mika Westerberg <[email protected]>
> Cc: [email protected]
> Cc: Steven Rostedt <[email protected]>
> Cc: Linux Kbuild mailing list <[email protected]>
> ---


Applied to linux-kbuild.
Thanks.


--
Best Regards
Masahiro Yamada

2023-06-07 14:54:57

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH] streamline_config.pl: handle also ${CONFIG_FOO}

On Wed, 7 Jun 2023 21:22:47 +0900
Masahiro Yamada <[email protected]> wrote:

> On Wed, Jun 7, 2023 at 3:14 PM Jiri Slaby (SUSE) <[email protected]> wrote:
> >
> > From: Jiri Slaby <[email protected]>
> >
> > 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 <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > Cc: Mika Westerberg <[email protected]>
> > Cc: [email protected]
> > Cc: Steven Rostedt <[email protected]>
> > Cc: Linux Kbuild mailing list <[email protected]>
> > ---

I believe I acked this change back here:

https://lore.kernel.org/all/[email protected]/

But again:

Acked-by: Steven Rostedt (Google) <[email protected]>

-- Steve