Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI: utils: Refine acpi_handle_list_equal() slightly

It is somewhat better to use the size of the first array element for
computing the size of the entire array than to rely on the array
element data type definition knowledge and the former is also
consistent with the array allocation in acpi_evaluate_reference(),
so modify the code accordingly.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

+1 -1
+1 -1
drivers/acpi/utils.c
··· 408 408 { 409 409 return list1->count == list2->count && 410 410 !memcmp(list1->handles, list2->handles, 411 - list1->count * sizeof(acpi_handle)); 411 + list1->count * sizeof(*list1->handles)); 412 412 } 413 413 EXPORT_SYMBOL_GPL(acpi_handle_list_equal); 414 414