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

ACPI: dock: fix enum-conversion warning

gcc points out a type mismatch:

drivers/acpi/dock.c: In function 'hot_remove_dock_devices':
drivers/acpi/dock.c:234:53: warning: implicit conversion from 'enum <anonymous>' to 'enum dock_callback_type' [-Wenum-conversion]
234 | dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false);

This is harmless because 'false' still has the correct numeric value,
but passing DOCK_CALL_HANDLER documents better what is going on
and avoids the warning.

Fixes: 37f908778f20 ("ACPI / dock: Walk list in reverse order during removal of devices")
Fixes: f09ce741a03a ("ACPI / dock / PCI: Drop ACPI dock notifier chain")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Arnd Bergmann and committed by
Rafael J. Wysocki
be0e9752 3650b228

+2 -1
+2 -1
drivers/acpi/dock.c
··· 231 231 * between them). 232 232 */ 233 233 list_for_each_entry_reverse(dd, &ds->dependent_devices, list) 234 - dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false); 234 + dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, 235 + DOCK_CALL_HANDLER); 235 236 236 237 list_for_each_entry_reverse(dd, &ds->dependent_devices, list) 237 238 acpi_bus_trim(dd->adev);