summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utils.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-08 21:06:45 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-12-15 10:46:05 +0100
commit1feb042d4e9b30b3ec3363e557d2ba884485f835 (patch)
tree14b4fee0dd03d184a5ec9b7832c50e01ef81aabe /drivers/acpi/utils.c
parentACPI: utils: Return bool from acpi_evaluate_reference() (diff)
downloadlinux-1feb042d4e9b30b3ec3363e557d2ba884485f835.tar.xz
linux-1feb042d4e9b30b3ec3363e557d2ba884485f835.zip
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>
Diffstat (limited to 'drivers/acpi/utils.c')
-rw-r--r--drivers/acpi/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 958dc651d467..57663065dbf6 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -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);