Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 1A907224D6 for ; Thu, 23 Nov 2023 10:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Uo+91kGo" Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9DC4C813E3 for ; Thu, 23 Nov 2023 10:07:28 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 9DC4C813E3 Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Uo+91kGo X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -4.401 X-Spam-Level: Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h8Ur2GQUgITl for ; Thu, 23 Nov 2023 10:07:28 +0000 (UTC) Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by smtp1.osuosl.org (Postfix) with ESMTPS id E25C8813DC for ; Thu, 23 Nov 2023 10:07:27 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org E25C8813DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700734047; x=1732270047; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=ibYMWWRd/P2AQAHicSo9ziPs651CklYQuIen4L+deis=; b=Uo+91kGoZeAxR6jlEKJcpb5pyiBVTdmYASuH6rcwHjrBvzLCWipvpjyZ wjU/VFYK7yJyqA3/f4VWj9/qQuEC9lkXb4XZAgX2th5xpUgO/xzBE1MXu eiRDEcXnXer0vSoJpKKrqRACdneEKtyI8GhgrRchmetd1w4v4MAc4YQc5 3ndWsWJAMbxLvEcGmPb/kqfF3mbzzpabuxw739xwSEnwF5wx7XhJ0W4bL LpKJwLcRLAFfsTDcVMOgi3oG5HX+T3YL8K5oVAJhIOr1KAmgcErHVW7o+ pxl87nfMPV09D4+s5KVjLbYxmcS6nM5zjV5Zzpk9pbwf3jp9tqiykx5bA A==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="456576427" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="456576427" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 02:07:26 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="767160521" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="767160521" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by orsmga002.jf.intel.com with ESMTP; 23 Nov 2023 02:07:21 -0800 From: Raag Jadav To: mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com, ardb@kernel.org, will@kernel.org, mark.rutland@arm.com Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, acpica-devel@lists.linuxfoundation.org, linux-efi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, mallikarjunappa.sangannavar@intel.com, bala.senthil@intel.com, Raag Jadav Subject: [PATCH v3 4/5] efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID Date: Thu, 23 Nov 2023 15:36:16 +0530 Message-Id: <20231123100617.28020-5-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231123100617.28020-1-raag.jadav@intel.com> References: <20231123100617.28020-1-raag.jadav@intel.com> Precedence: bulk X-Mailing-List: acpica-devel@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav Reviewed-by: Ard Biesheuvel --- drivers/firmware/efi/dev-path-parser.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/firmware/efi/dev-path-parser.c b/drivers/firmware/efi/dev-path-parser.c index f80d87c199c3..937be269fee8 100644 --- a/drivers/firmware/efi/dev-path-parser.c +++ b/drivers/firmware/efi/dev-path-parser.c @@ -18,8 +18,6 @@ static long __init parse_acpi_path(const struct efi_dev_path *node, struct acpi_device *adev; struct device *phys_dev; char hid[ACPI_ID_LEN]; - u64 uid; - int ret; if (node->header.length != 12) return -EINVAL; @@ -31,10 +29,9 @@ static long __init parse_acpi_path(const struct efi_dev_path *node, node->acpi.hid >> 16); for_each_acpi_dev_match(adev, hid, NULL, -1) { - ret = acpi_dev_uid_to_integer(adev, &uid); - if (ret == 0 && node->acpi.uid == uid) + if (acpi_dev_uid_match(adev, node->acpi.uid)) break; - if (ret == -ENODATA && node->acpi.uid == 0) + if (!acpi_device_uid(adev) && node->acpi.uid == 0) break; } if (!adev) -- 2.17.1