]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ACPI: utils: Refine acpi_handle_list_equal() slightly
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 8 Dec 2023 20:06:45 +0000 (21:06 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 Dec 2023 09:46:05 +0000 (10:46 +0100)
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>
drivers/acpi/utils.c

index 958dc651d4672feccfa3019baacae416e3e844c5..57663065dbf6b8eaf3521479b275f92ec6e5b685 100644 (file)
@@ -408,7 +408,7 @@ bool acpi_handle_list_equal(struct acpi_handle_list *list1,
 {
        return list1->count == list2->count &&
                !memcmp(list1->handles, list2->handles,
-                       list1->count * sizeof(acpi_handle));
+                       list1->count * sizeof(*list1->handles));
 }
 EXPORT_SYMBOL_GPL(acpi_handle_list_equal);