Message ID | 20051.29353.630250.758016@pilspetsen.it.uu.se (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
--- linux-3.1-rc3/include/acpi/acpi_drivers.h.~1~ 2011-08-23 10:42:23.000000000 +0200 +++ linux-3.1-rc3/include/acpi/acpi_drivers.h 2011-08-23 11:06:50.000000000 +0200 @@ -144,7 +144,7 @@ static inline void unregister_dock_notif { } static inline int register_hotplug_dock_device(acpi_handle handle, - struct acpi_dock_ops *ops, + const struct acpi_dock_ops *ops, void *context) { return -ENODEV;
I got the following compiling kernel 3.1-rc3 on x86_64 with CONFIG_ACPI_DOCK=n: drivers/ata/libata-acpi.c: In function 'ata_acpi_associate': drivers/ata/libata-acpi.c:266:11: warning: passing argument 2 of 'register_hotplug_dock_device' discards 'const' qualifier from pointer target type [enabled by default] include/acpi/acpi_drivers.h:146:19: note: expected 'struct acpi_dock_ops *' but argument is of type 'const struct acpi_dock_ops *' drivers/ata/libata-acpi.c:275:11: warning: passing argument 2 of 'register_hotplug_dock_device' discards 'const' qualifier from pointer target type [enabled by default] include/acpi/acpi_drivers.h:146:19: note: expected 'struct acpi_dock_ops *' but argument is of type 'const struct acpi_dock_ops *' The two versions of register_hotplug_dock_device() in acpi_drivers.h, depending on CONFIG_ACPI_DOCK, differ in whether the 2nd parameter is const or not. The dummy version for !DOCK lacked the const, causing the warning. Trivially fixed by adding the const. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> --- -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html