Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp283799rdf; Tue, 21 Nov 2023 02:39:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IErKMmGABTckMSm+tJOXZPe3VRUMSWca4qsG1wIZ5iLJZIwY7L1P+F6Z2qTDau2LyWmhx+g X-Received: by 2002:a05:6a20:4411:b0:18a:b5c3:55da with SMTP id ce17-20020a056a20441100b0018ab5c355damr3867089pzb.10.1700563184861; Tue, 21 Nov 2023 02:39:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700563184; cv=none; d=google.com; s=arc-20160816; b=Fwl0/wdhYvqR5M91AsAF+gE7DqimhX7/2Pc4FPPlb9Au30WhAcEs2MYwRqfISCeJW9 yCRDcIk3pToSemuHn0s+Xud8xIL4W5AWPxH0iC3RaM7r17d922SgRmB9/XCn2eTU2eAE f1yVVf99yZ5vPEONQawYEwvrA4EP/udHnURudXR7NaLHlTqDk26fdTOm0QvF7elNSMF1 niZkyKFaYb5EOgWNU96axQZoTw/s3RN3ejKQarSYdk6MohkWJ6kMq/MNeAiEhVc5rNiy P1xDSBuwzOcoZLO4lIaYTPC+f2kjqQY+0K2dqB8EZGNeOmBKoIkdcJTCX8TOaYX5SdZC ra2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=uBYoIdOi/PjZLZumIVGyz365i/BQRkVzkqhHodBS9XY=; fh=LrjGCQr9k+7CYyd6XEdJgJkCFIUW/cPwqK3zW8PbdHI=; b=jp0jrQWe2HMxt2Zi7EB3l3HLBq0ySdpUm5JnndrjHcpzyr5lbpua7MjjdU4N6ylXjC 61QCy5z/U7O2HSnVlkRpvXLT1xcTG6s9Nsd4JC5W2PwzfRREnny4j6ToGtoffIN6j2lR moMSFQC/kPLPzFKYVndXGAIIqbpm0nPpL0CUy1ImrkqZm6Zgvx6itisk7gJom0lkDHcX s1UdLx0dPr7Y6sNoj0ExEC9vr0S+oxbY9eoV94IfTMaJajWM6gvNiiOHZoSB5e/5P2/S GSTWlxA7QP/TwBYbE3EqS+gLcqwDLISnQSVSeGbMyb8S7z6qPMqz+M1cEje9ECIp9Xyb xeJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N+6vK8AH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s64-20020a625e43000000b006cb651670e1si6019074pfb.77.2023.11.21.02.39.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 02:39:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=N+6vK8AH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 96D4980B7AFE; Tue, 21 Nov 2023 02:39:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234010AbjKUKjQ (ORCPT + 99 others); Tue, 21 Nov 2023 05:39:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233882AbjKUKjG (ORCPT ); Tue, 21 Nov 2023 05:39:06 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7E7D18C; Tue, 21 Nov 2023 02:39:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700563140; x=1732099140; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=G01FEu7mgWj6wch0a4BuSRZSlujWtyeQmN3DyjCESFk=; b=N+6vK8AHJ7uIgo5uvrxayMWy6QFoS2h2XDKE14xu2aZfn7ineNfmr7bU jgInoLJrxFxKtRcjNKOzvQU10PhcGGRxgehr0OkWGFh1T0DrbMUzChUJj jlw/TyCJEx5a05p/q4cCj6lx1sAC8D07PQyWB1rrtrc0re7dOc9uE5VAr epIfQBoP2IYQkXqukZlpZZ1Xn+U36ai4DD0cie9ky46CfDwTpKsXm9uTD xjXXoOyDPu8xqDAkDPSPL5CxAmePszau+pC+swm5yGX5Fo6IOu7pC3dSa G6D1mfqEZKbFOROQZxtLbwHCuyRktVivbbcJLMF4SsNfi9ez/w4dQlkF6 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="371987007" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="371987007" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 02:38:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="14871957" Received: from inlubt0316.iind.intel.com ([10.191.20.213]) by fmviesa001.fm.intel.com with ESMTP; 21 Nov 2023 02:38:56 -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 v2 5/6] efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID Date: Tue, 21 Nov 2023 16:08:28 +0530 Message-Id: <20231121103829.10027-6-raag.jadav@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231121103829.10027-1-raag.jadav@intel.com> References: <20231121103829.10027-1-raag.jadav@intel.com> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 21 Nov 2023 02:39:42 -0800 (PST) Now that we have _UID matching support for integer types, we can use acpi_dev_uid_match() for it. Signed-off-by: Raag Jadav --- 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