From patchwork Mon Sep 30 17:02:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13816721 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B4875103F; Mon, 30 Sep 2024 17:02:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727715752; cv=none; b=Kci8KuNWNp9/Kjv0Xi9/z9qaMK2ZL9YMoidssI3rCs757/zkD4VE2m4yRP/ywOhmvoQVdGohHqW3w0/tuODKxwBYIRzE1cj5ZyCzmVoZFz6NRGY6X3Lo1hDlgzDXWxGukyAiPrGyt8p6vkxmY/6IltppsZ8PuTRBQaccLvhNsDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727715752; c=relaxed/simple; bh=IdNUBN643bDwmAr2G+H5eoxHgPvXm4p8NntU3HAHOvY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=sGRLLmjXGNYTt8fzbu18zzucXuFeswsRFgXC8pXEwwsPpXGC5eSphv8cCDcPABo9A2CDt5PqU6jDD5iFDE3QGzRQdkn6BD8IYB56s9xZp9yeRxmnf0jXSDtmhMwlHmyBSlzOsfKDXNONNPpR1+hZ/JAN+ToWk0THeNm+epjDVjs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=TYIRsQPQ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="TYIRsQPQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F54AC4CEC7; Mon, 30 Sep 2024 17:02:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727715750; bh=IdNUBN643bDwmAr2G+H5eoxHgPvXm4p8NntU3HAHOvY=; h=From:To:Cc:Subject:Date:From; b=TYIRsQPQBn0HQoh0mmTABJkxss6AEjyxwa8WRTBxxaVNYCD9OWkRdlR3zLEdmY2Cn vXyM2vcUONEnGfyxAY5hKQIpiFfAchiSPnWieApi/U5VQ8LNWhPryQAzhMdej2wyrb xf9A0D2CEoIJAjGpPxGCYW3FCycDY+CwitYaMyHnCjucYHFN9NBf897Ihac7S6q/Ox aqSA4xbkj3pICiFVH97Vk9puBgNtAiHaDvIIMHQVF5u7u2rL7OpJx4NC5YgNsrPp4V Mq8lfFQEeg4CP5I5taDKlxngNnAjTf2WSBzGmBAtF021fn2PUmxAVmXAduBnYlEqvI fvZKjctpLnk6g== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 1/2] kconfig: clear expr::val_is_valid when allocated Date: Tue, 1 Oct 2024 02:02:22 +0900 Message-ID: <20240930170226.475324-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Since commit 95573cac25c6 ("kconfig: cache expression values"), xconfig emits a lot of false-positive "unmet direct dependencies" warnings. While conf_read() clears val_is_valid flags, 'make xconfig' calculates symbol values even before the conf_read() call. This is another issue that should be addressed separately, but it has revealed that the val_is_valid field is not initialized. Fixes: 95573cac25c6 ("kconfig: cache expression values") Signed-off-by: Masahiro Yamada --- scripts/kconfig/expr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index 78738ef412de..16f92c4a775a 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -47,6 +47,7 @@ static struct expr *expr_lookup(enum expr_type type, void *l, void *r) e->type = type; e->left._initdata = l; e->right._initdata = r; + e->val_is_valid = false; hash_add(expr_hashtable, &e->node, hash); From patchwork Mon Sep 30 17:02:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13816722 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD461194A61; Mon, 30 Sep 2024 17:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727715753; cv=none; b=UbyyLVL5pz0H5TzAiktpTZfHGq9rCrbiS1uLTAH3bre+027vOCvBBzzAGKRI1yFNxSxTjgvLqVelvEVELvvUUfP2tc5/lxlhPE8HC0IoKM9dB7H5HMn36zTfMWvwZm06ZYLnLZFs+EccdCQ7sfdDuDtWo/R+Ikpnx8w9CZAtz/o= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727715753; c=relaxed/simple; bh=ACAfKayrCBwfEBotRpavHeP3jFDFI582KrFNfEtbij8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pswrcyVn/lEU5dWemXr4fbZFya6omH0CHIYbC4f3y0rZuwrPSUIc3sFrnHtwF++LAaHa0xWajjgotukrocUgYyUrZnk7gqwrTFBMwhf9pO/xCT6mAMKnwWp3XXXcIJNxWmRU38mK/K0K1/9SmnpKSH6CpFOZq33wHGfcDxJxi1E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qrOKZsaj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qrOKZsaj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 51A06C4CECE; Mon, 30 Sep 2024 17:02:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1727715752; bh=ACAfKayrCBwfEBotRpavHeP3jFDFI582KrFNfEtbij8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qrOKZsajpV7rm1cFbpSuW7gBorFV+EUgNXmhKG6883llZPfwA6UYHaGaXxJ0uN3Qt 4sXF6dVigO62tDI56irCsURzAFMs6vkhLjplKEeA+EpHwe/LH8vhp0FhzwmaUvBzI+ qg6sSUzQskXVTlXsUGHp9TfVlYLcPuviSBxRICoe4LLMqFca+MEazkZfDYDbOp3GtQ P6AnuEn05PBll+JgqC4zfQkzBIF3JyoQ1ZxkGV6GSEui6QbJuQ3qUP5PsLR7eBCxWF 7EKMvOEic5o/9X3As8TpDpi1IafgvrYezTfxKhrrutu2c1O6WZo6VmtL9sIQPWPPvF Sh4mLWmAZouQg== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 2/2] kconfig: qconf: move conf_read() before drawing tree pain Date: Tue, 1 Oct 2024 02:02:23 +0900 Message-ID: <20240930170226.475324-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240930170226.475324-1-masahiroy@kernel.org> References: <20240930170226.475324-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The constructor of ConfigMainWindow() calls show*View(), which needs to calculate symbol values. conf_read() must be called before that. Fixes: 060e05c3b422 ("kconfig: qconf: remove initial call to conf_changed()") Signed-off-by: Masahiro Yamada --- scripts/kconfig/qconf.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/qconf.cc b/scripts/kconfig/qconf.cc index 97fce13e551e..7dba8014ead4 100644 --- a/scripts/kconfig/qconf.cc +++ b/scripts/kconfig/qconf.cc @@ -1505,6 +1505,8 @@ ConfigMainWindow::ConfigMainWindow(void) connect(helpText, &ConfigInfoView::menuSelected, this, &ConfigMainWindow::setMenuLink); + conf_read(NULL); + QString listMode = configSettings->value("/listMode", "symbol").toString(); if (listMode == "single") showSingleView(); @@ -1906,8 +1908,6 @@ int main(int ac, char** av) configApp->connect(configApp, SIGNAL(lastWindowClosed()), SLOT(quit())); configApp->connect(configApp, SIGNAL(aboutToQuit()), v, SLOT(saveSettings())); - conf_read(NULL); - v->show(); configApp->exec();