Skip to content

Commit

Permalink
platform/x86: wmi: Replace open coded guid_parse_and_compare()
Browse files Browse the repository at this point in the history
Even though we have no issues in the code, let's replace the open
coded guid_parse_and_compare().

Signed-off-by: Andy Shevchenko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Tested-by: Armin Wolf <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
  • Loading branch information
andy-shev authored and jwrdegoede committed Jul 10, 2023
1 parent 028e6e2 commit 6bf06f1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/platform/x86/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1241,11 +1241,7 @@ static bool guid_already_parsed_for_legacy(struct acpi_device *device, const gui
list_for_each_entry(wblock, &wmi_block_list, list) {
/* skip warning and register if we know the driver will use struct wmi_driver */
for (int i = 0; allow_duplicates[i] != NULL; i++) {
guid_t tmp;

if (guid_parse(allow_duplicates[i], &tmp))
continue;
if (guid_equal(&tmp, guid))
if (guid_parse_and_compare(allow_duplicates[i], guid))
return false;
}
if (guid_equal(&wblock->gblock.guid, guid)) {
Expand Down

0 comments on commit 6bf06f1

Please sign in to comment.