From patchwork Tue Jun 11 17:55:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13694089 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 ABA121534EB; Tue, 11 Jun 2024 17:56:15 +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=1718128575; cv=none; b=r6223VqcHqNJRBt2dG5+xYuwQn5BWHyQSqrlKpHBZ8DYFe931usB3IQFUUEFK844xFx21UM7Gb6MaLvXMimcayqFJIC3HcYB3DKifPN3EAhTIUYwjAiClpbPOpk00mxAQFcw64q4DXDbdN4dPjfOhqT/FlHNvwcKE7piutlYhvY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718128575; c=relaxed/simple; bh=qpviQ1ERfH+WJ2ZfrRjot8me/WrXcMTZ24tdvkIstK0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mw06u3jrlTFvoA4WQf+/LGNiw6kKzRvKuGoVhX5bmPKW13yelLVbp8aVwZiHzc06PbjLR4RRfa/NhtqleOeEF8UTp1a83pYSJ2dEOKumKi4skuQbF8lGU+r345ua0II00kA4cI3ZO0nSAkHIjtBSJ4LUcQEZqCTwJgJ+3st9vV8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cY0QvwRU; 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="cY0QvwRU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75E54C32786; Tue, 11 Jun 2024 17:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718128575; bh=qpviQ1ERfH+WJ2ZfrRjot8me/WrXcMTZ24tdvkIstK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cY0QvwRU3froZ6qec0HZ+AAWgrCD78FR1O0r/TAlSKq5PP4aqN18MV6lbqH3n4SUC IUFVx1FyM5p8MjTpLXDO85hEt43YygAkOWskUvuYLLWjKmm7xb56vezP66SiBMLDAC AkGdlB9rE9H4HOO+RRJGYnEgIt37SJiz17BMLCPTsuWjWAj7BtM/XAmTojFyTnALAD h0Slh0TNl9RCt4buh5J0ax9kELMxisrqCz/5ULYenC3FfYUbDliIt0WEiXYy6nNyBY qRJv/wYYe8PxXFCumpOVh8YtquKTXD/xRE8jy58/ICqHWQKCnFOHlNPYHfAG3jl8Ps 9JilaLOB4BD0A== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 12/16] kconfig: use sym_get_choice_menu() in sym_check_print_recursive() Date: Wed, 12 Jun 2024 02:55:21 +0900 Message-ID: <20240611175536.3518179-13-masahiroy@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240611175536.3518179-1-masahiroy@kernel.org> References: <20240611175536.3518179-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kbuild@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Choices and their members are associated via the P_CHOICE property. Currently, prop_get_symbol(sym_get_choice_prop()) is used to obtain the choice of the given choice member. Replace it with sym_get_choice_menu(), which retrieves the choice without relying on P_CHOICE. Signed-off-by: Masahiro Yamada --- scripts/kconfig/symbol.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 32b38724c960..86358cfb39cc 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -1068,12 +1068,14 @@ static void sym_check_print_recursive(struct symbol *last_sym) struct dep_stack *stack; struct symbol *sym, *next_sym; struct menu *menu = NULL; + struct menu *choice; struct property *prop; struct dep_stack cv_stack; - if (sym_is_choice_value(last_sym)) { + choice = sym_get_choice_menu(last_sym); + if (choice) { dep_stack_insert(&cv_stack, last_sym); - last_sym = prop_get_symbol(sym_get_choice_prop(last_sym)); + last_sym = choice->sym; } for (stack = check_top; stack != NULL; stack = stack->prev)