Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp504037rdf; Tue, 21 Nov 2023 08:20:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGh527bQgFeRiNW5Kxo9VUNYmV8+4uAmjfYZKnr9XyvhM8m/3XZvmek18RVzKlHXNK7Mtq/ X-Received: by 2002:a17:902:8b85:b0:1cc:665d:f818 with SMTP id ay5-20020a1709028b8500b001cc665df818mr8136066plb.68.1700583615757; Tue, 21 Nov 2023 08:20:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700583615; cv=none; d=google.com; s=arc-20160816; b=c2uwBUvZvMoUAwOVxmQA1dHxf37XKCeLdoWKLwx2COWpYYnztKIUuSGhneByFbIig8 iuEn8I58QhzD6w9b/hRUPdEnvbkWb1EN83Lc8MO1u4wQC0ReoZy4ilbbesIUlZVWcx6o mB4CCf9eSa3nxkkdKgRMBrbWyZA4z2X/N8i7WQMSTdKC/rMIXTVOlaAvLRX3OD15l6FE Dw7b6wDoK+ahfBqGs2jRh0ATCDPWcQerwjOGYWZQo8i69sAtuaF46kZymtfgK5/P6JZB toPzMvFAO39McPVjrFMgwwSU749NDWdISFmBsd0LtE4Jeh9+iIiz0w/c0IcB8L3ItDdK FGjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Zi33TJzPBUsDGAkZBrkzhvI5ED40XF+sZj2D413F8v4=; fh=Qj7wMe2xgSlcmk0fHBbXIXtOUJuYfub+OjSZ2eZiVBk=; b=WCj5zfRDdteme+xAWEsENXvr8crOzhM/GJEnnvCuRa3CdAPX9f1OdsvGLIjdKH9zFU WFumb4CZ1fBVgtNv1BcxKpCfhkptLoM+FK8v6p/ba+eQZBvRFgH3ua36Q5p+HVN1jOLL WAwoRsm/Ga9UnYSwpll7zEy/VvGfBfuUhUPS+cgQg1K4DiG12z4bQjct4OuN6zQaZcYY rjS0Wr5i9uqLNXtXPUa7BZt9CnKVX6lXmhRP1izfq0JI6Ue+2qGW//iox00+XbINwmBn sdnd2HKYzFbVDdVtiCS5wBk0lNRW14mgEkS43bYa67yhb8EhlL5TtcucWhte64mhJpYm 6xkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qQnYJ74n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id jd13-20020a170903260d00b001cf5d4e776csi4828061plb.287.2023.11.21.08.20.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 08:20:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=qQnYJ74n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id E328B80C2554; Tue, 21 Nov 2023 08:20:12 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230464AbjKUQUF (ORCPT + 99 others); Tue, 21 Nov 2023 11:20:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbjKUQUD (ORCPT ); Tue, 21 Nov 2023 11:20:03 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1EE10CB for ; Tue, 21 Nov 2023 08:20:00 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0751C433C9; Tue, 21 Nov 2023 16:19:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700583599; bh=/ftsIOr6PtvXmwDXJG2lgHpbTRDyOZqNHqOkYX1msmg=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=qQnYJ74n8oQzVtLAxKlA0npDWvAXMG5BczCbtm8Q7r1U9tmCrT/NYDhrCDJgV4dxH FpzqPbjUjkeuZ1oqf8JbcXboxg0/5HF3aXuCOud2H9tRy3N1oeJO28yQVzyEPboON7 tHv97fMIje/U8dP08iA6XHgtkk/cXHcezhCVMTdr2aJ0F/tAE2VrMR+7xF82QLBeUn ELAtG3qCN7qEO9ahwWMgIlGiuJby3jBl04eev+q+T54u5IjB0I2A3PEj3YfbuSFFmc 05pobXOY9fPL66pCFy2QE3Tq5YI8vodE9OrSts1ygetRcZ6fP85P+BVaydWq75EdPz CeAb/VRx+JLbw== Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2c8879a1570so22352571fa.1; Tue, 21 Nov 2023 08:19:59 -0800 (PST) X-Gm-Message-State: AOJu0Yx8QC+R9Ctqz1UXYhkqq/JDF0l4ip6o1CI757nS3wwxzLLUn/HJ 6zMhzVP9q+6qFAzMus5i1n4vq1wWP8YvsCxhE4w= X-Received: by 2002:a2e:9e1a:0:b0:2c5:1f92:b464 with SMTP id e26-20020a2e9e1a000000b002c51f92b464mr6822339ljk.10.1700583597994; Tue, 21 Nov 2023 08:19:57 -0800 (PST) MIME-Version: 1.0 References: <20231121103829.10027-1-raag.jadav@intel.com> <20231121103829.10027-6-raag.jadav@intel.com> In-Reply-To: <20231121103829.10027-6-raag.jadav@intel.com> From: Ard Biesheuvel Date: Tue, 21 Nov 2023 11:19:46 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 5/6] efi: dev-path-parser: use acpi_dev_uid_match() for matching _UID To: Raag Jadav Cc: mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, rafael@kernel.org, lenb@kernel.org, robert.moore@intel.com, will@kernel.org, mark.rutland@arm.com, 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 groat.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 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 08:20:13 -0800 (PST) On Tue, 21 Nov 2023 at 05:39, Raag Jadav wrote: > > 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 >