[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jq=XdH+xeHs5=wMGsu28i+r3nzZbhCNMJkfdOi65N0Gg@mail.gmail.com>
Date: Fri, 17 Dec 2021 19:08:18 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Dan Williams <dan.j.williams@...el.com>
Cc: nvdimm@...ts.linux.dev,
ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>
Subject: Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use
On Mon, Dec 13, 2021 at 9:46 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> Strictly speaking the comparison between guid_t and raw buffer
> is not correct. Import GUID to variable of guid_t type and then
> compare.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Dan, are you going to take care of this or should I?
> ---
> drivers/acpi/nfit/core.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 7dd80acf92c7..e5d7f2bda13f 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -678,10 +678,12 @@ static const char *spa_type_name(u16 type)
>
> int nfit_spa_type(struct acpi_nfit_system_address *spa)
> {
> + guid_t guid;
> int i;
>
> + import_guid(&guid, spa->range_guid);
> for (i = 0; i < NFIT_UUID_MAX; i++)
> - if (guid_equal(to_nfit_uuid(i), (guid_t *)&spa->range_guid))
> + if (guid_equal(to_nfit_uuid(i), &guid))
> return i;
> return -1;
> }
> --
> 2.33.0
>
Powered by blists - more mailing lists