public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: kconfig: merge_config.sh: fix unexpected operator warning
@ 2026-03-09 12:15 Weizhao Ouyang
  2026-03-09 12:25 ` Mikko Rapeli
  2026-03-09 20:44 ` Nathan Chancellor
  0 siblings, 2 replies; 3+ messages in thread
From: Weizhao Ouyang @ 2026-03-09 12:15 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Mikko Rapeli, Daniel Gomez,
	Masahiro Yamada, Anders Roxell
  Cc: linux-kbuild, linux-kernel, Weizhao Ouyang

Fix a warning for:

$ ./scripts/kconfig/merge_config.sh .config extra.config
Using .config as base
Merging extra.config
./scripts/kconfig/merge_config.sh: 384: [: false: unexpected operator

The shellcheck report is also attached:

if [ "$STRICT" == "true" ] && [ "$STRICT_MODE_VIOLATED" == "true" ]; then
               ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
                                                        ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.

Fixes: dfc97e1c5da5 ("scripts: kconfig: merge_config.sh: use awk in checks too")
Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>
---
 scripts/kconfig/merge_config.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 735e1de450c6..073c6bec5245 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -381,7 +381,7 @@ END {
 	STRICT_MODE_VIOLATED=true
 fi
 
-if [ "$STRICT" == "true" ] && [ "$STRICT_MODE_VIOLATED" == "true" ]; then
+if [ "$STRICT" = "true" ] && [ "$STRICT_MODE_VIOLATED" = "true" ]; then
 	echo "Requested and effective config differ"
 	exit 1
 fi
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts: kconfig: merge_config.sh: fix unexpected operator warning
  2026-03-09 12:15 [PATCH] scripts: kconfig: merge_config.sh: fix unexpected operator warning Weizhao Ouyang
@ 2026-03-09 12:25 ` Mikko Rapeli
  2026-03-09 20:44 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Mikko Rapeli @ 2026-03-09 12:25 UTC (permalink / raw)
  To: Weizhao Ouyang
  Cc: Nathan Chancellor, Nicolas Schier, Daniel Gomez, Masahiro Yamada,
	Anders Roxell, linux-kbuild, linux-kernel

Hi,

On Mon, Mar 09, 2026 at 08:15:05PM +0800, Weizhao Ouyang wrote:
> Fix a warning for:
> 
> $ ./scripts/kconfig/merge_config.sh .config extra.config
> Using .config as base
> Merging extra.config
> ./scripts/kconfig/merge_config.sh: 384: [: false: unexpected operator
> 
> The shellcheck report is also attached:
> 
> if [ "$STRICT" == "true" ] && [ "$STRICT_MODE_VIOLATED" == "true" ]; then
>                ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
>                                                         ^-- SC3014 (warning): In POSIX sh, == in place of = is undefined.
> 
> Fixes: dfc97e1c5da5 ("scripts: kconfig: merge_config.sh: use awk in checks too")
> Signed-off-by: Weizhao Ouyang <o451686892@gmail.com>

Thanks!

Reviewed-by: Mikko Rapeli <mikko.rapeli@linaro.org>

> ---
>  scripts/kconfig/merge_config.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
> index 735e1de450c6..073c6bec5245 100755
> --- a/scripts/kconfig/merge_config.sh
> +++ b/scripts/kconfig/merge_config.sh
> @@ -381,7 +381,7 @@ END {
>  	STRICT_MODE_VIOLATED=true
>  fi
>  
> -if [ "$STRICT" == "true" ] && [ "$STRICT_MODE_VIOLATED" == "true" ]; then
> +if [ "$STRICT" = "true" ] && [ "$STRICT_MODE_VIOLATED" = "true" ]; then
>  	echo "Requested and effective config differ"
>  	exit 1
>  fi
> -- 
> 2.48.1
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] scripts: kconfig: merge_config.sh: fix unexpected operator warning
  2026-03-09 12:15 [PATCH] scripts: kconfig: merge_config.sh: fix unexpected operator warning Weizhao Ouyang
  2026-03-09 12:25 ` Mikko Rapeli
@ 2026-03-09 20:44 ` Nathan Chancellor
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2026-03-09 20:44 UTC (permalink / raw)
  To: Nathan Chancellor, Nicolas Schier, Mikko Rapeli, Daniel Gomez,
	Masahiro Yamada, Anders Roxell, Weizhao Ouyang
  Cc: linux-kbuild, linux-kernel

On Mon, 09 Mar 2026 20:15:05 +0800, Weizhao Ouyang wrote:
> Fix a warning for:
> 
> $ ./scripts/kconfig/merge_config.sh .config extra.config
> Using .config as base
> Merging extra.config
> ./scripts/kconfig/merge_config.sh: 384: [: false: unexpected operator
> 
> [...]

Applied to

  https://git.kernel.org/pub/scm/linux/kernel/git/kbuild/linux.git kbuild-fixes

Thanks!

[1/1] scripts: kconfig: merge_config.sh: fix unexpected operator warning
      https://git.kernel.org/kbuild/c/3b4a3a00de877

Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped or
reverted. Patches applied to an "unstable" branch are accepted pending
wider testing in -next and any post-commit review; they will generally
be moved to the main branch in a week if no issues are found.

Best regards,
-- 
Nathan Chancellor <nathan@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-03-09 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-09 12:15 [PATCH] scripts: kconfig: merge_config.sh: fix unexpected operator warning Weizhao Ouyang
2026-03-09 12:25 ` Mikko Rapeli
2026-03-09 20:44 ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox