Skip to content

Commit 1feb042

Browse files
committed
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 parent 6909e0f commit 1feb042

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ bool acpi_handle_list_equal(struct acpi_handle_list *list1,
408408
{
409409
return list1->count == list2->count &&
410410
!memcmp(list1->handles, list2->handles,
411-
list1->count * sizeof(acpi_handle));
411+
list1->count * sizeof(*list1->handles));
412412
}
413413
EXPORT_SYMBOL_GPL(acpi_handle_list_equal);
414414

0 commit comments

Comments
 (0)