Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2358043lqo; Mon, 13 May 2024 16:32:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6KsM6RmzBdP85femc3KjpZorArXNicZ9SoZyLfmMpMGiJJuGdKcqZrGUXuLXicN9tcUNIpywdbwUW38ztJ6YAQ+mKvX1eJTi5gw7OHA== X-Google-Smtp-Source: AGHT+IFfL9ht1ZH81vdusUkcy4XXdNRtCR52qzE7tcX/XmT7UYJUB0vy4WEsvEtyaps4W4H9HPDe X-Received: by 2002:a05:6214:4519:b0:6a0:de15:7fcf with SMTP id 6a1803df08f44-6a168165ae6mr145833516d6.22.1715643121656; Mon, 13 May 2024 16:32:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715643121; cv=pass; d=google.com; s=arc-20160816; b=azk1BDA6sG02mjTGzzmAoaFBXpGotqLVSWNUQ3SWFDX3bjVYIH+qOUQNldVUUI/ifz DbZ8MaQ2vfjQPRduZZsUVrW14KHJbqPN9wnI4QdJAx+BTeXqzt8ZnqzOscOMJZbWodhL TNzS+a2gVNr3871xFQ3aH6X6ADHB/FiKhJqbT8DFIIb63im7g2KLdGOUhpJ6QzeLjL5z S8DLI1FtQYC7+jJLx+ARHWgfHQ9HfPoyUOFzfMDKr2CPwawVkWPI6z9sNlHzy6kgWxfy xpUe2y9m+4hrRPiH+7ODPu3F6H4DhWZuWRcZk9vIZtRNXBBdqMhF1yJMM7jP0dtJcCsr Y/kQ== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=3bBdScRO+TQCB5VCnr2ijac194fAyE/77HsLhPCX7OU=; fh=oQbvuNnOUeIuBT5siQdg+euUHNNdn+CeEwAg69/1RSo=; b=uUgBo2xssIwp+nKOYehiozepbDvJpgDh+7Gp0hgJDzwPqFac57ox5kU4UW6a9FS1Tk NhjlKTSyfECXMGrR3Av8zOXefXrkbqPZ4BCchjJRFkAozJn46pazXsF7/1r75CmSL6oK ajc4nB2agQKNvzgMk5WtrfhjE3rgyrUoE3Ulb2QFa9wKERiQvf0Tc03jScMNlLAY9TWv qsAltVDgr2zyTINbjJOoUGx8q0esMjTkNBvuj0ObGPpxn5lhhtcUMvghti4Di7h5iMns Q0ifhBT/0fDd3ICgTPj+6vxpA83K0XGZBKMYqZlmdCpCAzuvyfYursuHBX9uvNqPJGDe hSpw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eOZr0mVY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178179-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 6a1803df08f44-6a15f1d7401si105847166d6.122.2024.05.13.16.32.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 May 2024 16:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178179-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=eOZr0mVY; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-178179-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178179-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 606A01C213B9 for ; Mon, 13 May 2024 23:32:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 036208594A; Mon, 13 May 2024 23:31:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eOZr0mVY" 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 2D63A85622; Mon, 13 May 2024 23:31:47 +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=1715643107; cv=none; b=k+n1rYu0wEWWW6ZIi2qxPd5++LQ8lgWJottgCHOA+N4G/5f0oPmzq7APqJTZBd0Tr4u15vmuhbCLqOhWO80d4PY2qBREN+ICuHwxXuOUBpNvun8HHzpRny6oEE8Z5pQky3ZgYG//dBQqjUxldKSsH7w9iFkkxZpg3tyFdjYdVKQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715643107; c=relaxed/simple; bh=8aCK+9otNEWX8teUIuXuFTHKu5bAZsokXv23+TwPN/E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pDxWKBdz+Wc9y+XrmVlGU3HU8CueZqTzMxWixMB1ptdvk2Wfv2d4F1sF58PeEyZt71tNTW9xIbSaRK5YpT+sgNgsfZAxMZuP1473QtlKMvgdmtICxtdPqyDcSbzl81b8WDN9WgfOYuQpkr724OZDmsk4ro4IONaCVAczE2wWa8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eOZr0mVY; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26D9EC113CC; Mon, 13 May 2024 23:31:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715643107; bh=8aCK+9otNEWX8teUIuXuFTHKu5bAZsokXv23+TwPN/E=; h=From:To:Cc:Subject:Date:From; b=eOZr0mVYNyHiTSvYNAsECBCdwV4kuWKj3Or8DhPSPVAPcULSJxHrJqQj50ZPtjNkb 0HsVTsONC2EYsB4+FpNA5FEjjnY/c8PjaWDbYSoOhxxUMotK4hlIu9tcSN+VE6QHwd XkQa/FsURRh7Wwq0IL0Fps1liEi+LVyB8dVCNFi7N5fBIy9CXtb+mqzw0TJRDZ0mdN OuKh9Il+9EXFKq5v8yLXUIy2wAGQcFZA6vaR2NDLRvmVKh9nqNL1w1XIMSNp/SaHsQ XQ2kjgdqzEqqfjPxVJCXZlhhb8HD0eCQmp7LroU+nGc8sbuzWXggNr/Gh+Tnl5iq8q x/sWxe7+vF8HQ== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Masahiro Yamada Subject: [PATCH] kconfig: use sym_get_choice_menu() in sym_check_prop() Date: Tue, 14 May 2024 08:31:42 +0900 Message-Id: <20240513233142.458372-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 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/menu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index bee96c9964fd..53151c5a6028 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -263,11 +263,9 @@ static void sym_check_prop(struct symbol *sym) sym->name); } if (sym_is_choice(sym)) { - struct property *choice_prop = - sym_get_choice_prop(sym2); + struct menu *choice = sym_get_choice_menu(sym2); - if (!choice_prop || - prop_get_symbol(choice_prop) != sym) + if (!choice || choice->sym != sym) prop_warn(prop, "choice default symbol '%s' is not contained in the choice", sym2->name); -- 2.40.1