If an input config file contains CONFIG_FOO=n the output one will contain a line '# CONFIG_FOO is not set'. merge_config.sh should not report it as difference because the end result of CONFIG_FOO being disabled is achieved. Inexistence of CONFIG_FOO (because of unment dependencies) in case CONFIG_FOO=n is requested, should also be ignored. Signed-off-by: Łukasz Stelmach <l.stelmach@xxxxxxxxxxx> --- scripts/kconfig/merge_config.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index e5b46980c22a..c6fd6722f1a4 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -196,9 +196,13 @@ for CFG in $(sed -n -e "$SED_CONFIG_EXP1" -e "$SED_CONFIG_EXP2" $TMP_FILE); do REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE) ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG" || true) if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then - echo "Value requested for $CFG not in final .config" - echo "Requested value: $REQUESTED_VAL" - echo "Actual value: $ACTUAL_VAL" - echo "" + if [ "x$REQUESTED_VAL" != "x$CFG=n" -o \ + \( "x$ACTUAL_VAL" != "x" -a \ + "x$ACTUAL_VAL" != "x# $CFG is not set" \) ]; then + echo "Value requested for $CFG not in final .config" + echo "Requested value: $REQUESTED_VAL" + echo "Actual value: $ACTUAL_VAL" + echo "" + fi fi done -- 2.30.2