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 <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20230621151155.78279-2-andriy.shevchenko@linux.intel.com Tested-by: Armin Wolf <W_Armin@gmx.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
1 parent 028e6e2 commit 6bf06f1

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

  • drivers/platform/x86

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)