[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXEr2O8LZNq1r0zr1ZHPhtpbNu0PmZBk=UQvp7m0=ETodA@mail.gmail.com>
Date: Tue, 21 Nov 2023 11:19:46 -0500
From: Ard Biesheuvel <ardb@...nel.org>
To: Raag Jadav <raag.jadav@...el.com>
Cc: mika.westerberg@...ux.intel.com, andriy.shevchenko@...ux.intel.com,
rafael@...nel.org, lenb@...nel.org, robert.moore@...el.com,
will@...nel.org, mark.rutland@....com, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org,
acpica-devel@...ts.linuxfoundation.org, linux-efi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
mallikarjunappa.sangannavar@...el.com, bala.senthil@...el.com
Subject: Re: [PATCH v2 5/6] efi: dev-path-parser: use acpi_dev_uid_match() for
matching _UID
On Tue, 21 Nov 2023 at 05:39, Raag Jadav <raag.jadav@...el.com> 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 <raag.jadav@...el.com>
Reviewed-by: Ard Biesheuvel <ardb@...nel.org>
> ---
> 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
>
Powered by blists - more mailing lists