From: Jurica Vukadin Date: Tue, 7 Mar 2023 19:40:39 +0000 (+0100) Subject: kconfig: Update config changed flag before calling callback X-Git-Tag: v6.6.17~5285^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee06a3ef7e3cddb62b90ac40aa661d3c12f7cabc;p=platform%2Fkernel%2Flinux-rpi.git kconfig: Update config changed flag before calling callback Prior to commit 5ee546594025 ("kconfig: change sym_change_count to a boolean flag"), the conf_updated flag was set to the new value *before* calling the callback. xconfig's save action depends on this behaviour, because xconfig calls conf_get_changed() directly from the callback and now sees the old value, thus never enabling the save button or the shortcut. Restore the previous behaviour. Fixes: 5ee546594025 ("kconfig: change sym_change_count to a boolean flag") Signed-off-by: Jurica Vukadin Acked-by: Randy Dunlap Tested-by: Randy Dunlap Signed-off-by: Masahiro Yamada --- diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index b7c9f1d..992575f 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -1226,10 +1226,12 @@ static void (*conf_changed_callback)(void); void conf_set_changed(bool val) { - if (conf_changed_callback && conf_changed != val) - conf_changed_callback(); + bool changed = conf_changed != val; conf_changed = val; + + if (conf_changed_callback && changed) + conf_changed_callback(); } bool conf_get_changed(void)