Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp552409lqh; Sat, 4 May 2024 11:35:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUxqwpkzZxy7a8ZjcyuAc94Mlu5BrQvTykT/9nhZ7HwG8srqX86jL5AWaYC5uA1XqWsFrO6xLIh0zJcjOfDIPodOHqsFi53tQtRUKDeGg== X-Google-Smtp-Source: AGHT+IGZPRMQjhsSedBXeOFXzhifFaPvuuwsLu9JyqiqJbSQHAsCyYtkeukqOHdPQIWm+ucRiD9N X-Received: by 2002:a05:6808:152b:b0:3c5:f62a:435 with SMTP id u43-20020a056808152b00b003c5f62a0435mr8338456oiw.48.1714847711653; Sat, 04 May 2024 11:35:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714847711; cv=pass; d=google.com; s=arc-20160816; b=MWjVQ770XDG6Ra3ZYVvOdLqOslCHdSwJyzQIjwVp9UGo/eZPQgU79SkTVAAgaySvp2 5aeNlGx9KEHIs8xS1cPQh820hmGXNghf9Si60cE7c59Y1r5omIDNUNM1XG2ap4+2Llen B4Tgs7rUDB6DcMP+VgqlqT6wlF6i8jPTIxlnvMHRFAskE6t+vWDl/784rHAMlWWE+7jU YpiSpBx6btDQookp/EQovoFJRPohR/FH4moSzmdwpEgdNYGgahhqnGjq57gnJiWTPZfh vyglEBnbkAwECRSe+fBhNrOQvNMyKzR1DPd6XdgoAYE4ly+YirwsyXykEM0pU7gJ3hMZ zHRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=W1mvKgqWoz1fjW58hwb7uUpBhy0hJcJydW9kpTuyXxE=; fh=oQbvuNnOUeIuBT5siQdg+euUHNNdn+CeEwAg69/1RSo=; b=PebX8NwmmQifAfeDZ7uvczyBgan1vn+clHM8hXl9YEYGSCklS4TgmB3WoxP2fIXc3z lbzzK3G6Xn5MGXRKq/8U+Nan0tzBIrXPCXuUjqcvMhtkrDc4kZTuU+WdecJDtu7o55rF RER8odMJB/po2iiQ3arbhf+imFdL8qhEU/G0uOcGHwhjXCYg98JyLXBgS3B6kpTwfnLG kG9vMUhBYN6jOQbs2jrnp7jPCiwCfLaQniybfwxFxcXcoBBls1YBrPwrMKJySd60zspt Z7qOW1i8Looe3h+4LXoIE8lvHWHTUdNwtDFFn23Xve2q90NJuyozGwo5v5ky9BEmUEHZ 4bng==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFv7KZVg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id m4-20020a05622a118400b0043ac88d4f31si6070244qtk.299.2024.05.04.11.35.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 May 2024 11:35:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qFv7KZVg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-168792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5982E1C20D58 for ; Sat, 4 May 2024 18:35:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F12285262; Sat, 4 May 2024 18:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qFv7KZVg" 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 B75DD84FBE; Sat, 4 May 2024 18:34: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=1714847655; cv=none; b=E4E48fPxYc9w5FNhWfzCZ+DPwy8IM5pSSF2TlA5pWSk769TvJoTLSMajn677B83tYl2iQ3HllTY2vcnv0y7gWGUTSA64NeRWhLPfsakZbeoYzH15l8X9hJNrU7R5i+FEkr2JdfVle58u9CPiWXC7NeizDdxbwTmsJUQ39iRVLPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714847655; c=relaxed/simple; bh=1loWNNMJbgdISYcGMWi4T/QUodY2ppau9yw5McZ9ioc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oE6YBPfI8r8pfO2cRfgUqq+jyPG3fTI36l3+L/jiu5hf7rJAaJ5ptBPXaScgTNCdQul1JPNS7CNj9mqKXszKbDG8lDduek91WDHYTnof90D0+rgUiBOfwFp6JdIAkjLPX/WfWd6JwfUnryRNYJWmPDf0ttk+/4A+x+F3RrEst98= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qFv7KZVg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B078C4AF66; Sat, 4 May 2024 18:34:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714847655; bh=1loWNNMJbgdISYcGMWi4T/QUodY2ppau9yw5McZ9ioc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qFv7KZVgWm34At1/vHc5cyybcWeTpVpjPVlUrbaQ1w98TMdfSK1ZVIA6kgvq5w5Lc 69oiKciVnkyr5dyQwS97WwzY8Th/adKPCRkFOauvSiVvRw1Ex+Adq5LSxPxmll0/UI Y/KqSKAmKQc5W3H5WjFKuPYOYoW/4zaZB1EWD4ugm8krXDKLWm3bo7WDSQOS6ckl+K ePPK3qly2RqJ6qCUpsL63kqQtO5CIVp548HHWfshp7fJPKPhNvLhyPN/xpmjQhEdf3 ITz15Ja7lQC6zuDkn5mUB/y7b76cygF4jbC+9VbQ7M4frHc87u6oWssO8wjtOEwOYL 83Rgcsi3v3MzA== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH 06/10] kconfig: use sym_get_choice_menu() in conf_write_defconfig() Date: Sun, 5 May 2024 03:33:29 +0900 Message-Id: <20240504183333.2031860-6-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20240504183333.2031860-1-masahiroy@kernel.org> References: <20240504183333.2031860-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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/confdata.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 5caec434e6f4..e68890bbc035 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -794,6 +794,8 @@ int conf_write_defconfig(const char *filename) sym_clear_all_valid(); menu_for_each_entry(menu) { + struct menu *choice_menu; + sym = menu->sym; if (sym && !sym_is_choice(sym)) { sym_calc_value(sym); @@ -811,12 +813,11 @@ int conf_write_defconfig(const char *filename) * If symbol is a choice value and equals to the * default for a choice - skip. */ - if (sym_is_choice_value(sym)) { - struct symbol *cs; + choice_menu = sym_get_choice_menu(sym); + if (choice_menu) { struct symbol *ds; - cs = prop_get_symbol(sym_get_choice_prop(sym)); - ds = sym_choice_default(cs); + ds = sym_choice_default(choice_menu->sym); if (sym == ds) { if ((sym->type == S_BOOLEAN) && sym_get_tristate_value(sym) == yes) -- 2.40.1