[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK7LNASuP4L3gNyHvx7xVe3hG0sqQjB5eidq=9zs+20Ce09GEA@mail.gmail.com>
Date: Tue, 14 Mar 2023 03:47:01 +0900
From: Masahiro Yamada <masahiroy@...nel.org>
To: Jurica Vukadin <jura@...ad.in>
Cc: linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kconfig: Update config changed flag before calling callback
On Wed, Mar 8, 2023 at 4:40 AM Jurica Vukadin <jura@...ad.in> wrote:
>
> 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 <jura@...ad.in>
Applied to linux-kbuild.
Thanks.
> ---
> scripts/kconfig/confdata.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
> index b7c9f1dd5e42..992575f1e976 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)
> --
> 2.39.2
>
--
Best Regards
Masahiro Yamada
Powered by blists - more mailing lists