ACPI: NFIT: Import GUID before use
Subsystems (2)
PATCH 1/1 ACPI: NFIT: Import GUID before use
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 <[email protected]>
--- drivers/acpi/nfit/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/acpi/nfit/core.c +3 -1
@@ -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 ; }
Signature · 1 line
2.33.0
Rafael J. Wysocki
maintainerQuoted 6 lines · Andy Shevchenko
Strictly speaking the comparison between
guid_tand raw buffer is not correct. Import GUID to variable ofguid_ttype and then compare.Signed-off-by Andy Shevchenko <[email protected]>
Dan, are you going to take care of this or should I?
Quoted 25 lines
--- drivers/acpi/nfit/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/acpi/nfit/core.c +3
-2@@ -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
Quoted 11 lines · Rafael J. Wysocki
Quoted 6 lines · Andy Shevchenko
Strictly speaking the comparison between
guid_tand raw buffer is not correct. Import GUID to variable ofguid_ttype and then compare.Signed-off-by Andy Shevchenko <[email protected]>Dan, are you going to take care of this or should I?
I'll take it.
Apologies for the delay in responding. I am still catching up on some patch merging backlog.