Skip to content

Commit 6bf06f1

Browse files
andy-shevjwrdegoede
authored andcommitted
platform/x86: wmi: Replace open coded guid_parse_and_compare()
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]>
1 parent 028e6e2 commit 6bf06f1

File tree

1 file changed

+1
-5
lines changed
  • drivers/platform/x86

1 file changed

+1
-5
lines changed

drivers/platform/x86/wmi.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,11 +1241,7 @@ static bool guid_already_parsed_for_legacy(struct acpi_device *device, const gui
12411241
list_for_each_entry(wblock, &wmi_block_list, list) {
12421242
/* skip warning and register if we know the driver will use struct wmi_driver */
12431243
for (int i = 0; allow_duplicates[i] != NULL; i++) {
1244-
guid_t tmp;
1245-
1246-
if (guid_parse(allow_duplicates[i], &tmp))
1247-
continue;
1248-
if (guid_equal(&tmp, guid))
1244+
if (guid_parse_and_compare(allow_duplicates[i], guid))
12491245
return false;
12501246
}
12511247
if (guid_equal(&wblock->gblock.guid, guid)) {

0 commit comments

Comments
 (0)