* [PATCH] acpi: Fix build warnings for missing const on register_hotplug_dock_device static inline version
@ 2011-08-14 15:04 ` Kevin Winchester
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Winchester @ 2011-08-14 15:04 UTC (permalink / raw)
To: lenb; +Cc: Kevin Winchester, linux-acpi, linux-kernel
commit 9c8b04be443b33939f374a811c82abeebe0a61d1
Author: Vasiliy Kulikov <segoon@openwall.com>
Date: Sat Jun 25 21:07:52 2011 +0400
ACPI: constify ops structs
missed the static inline definition in include/acpi/acpi_drivers.h
for !CONFIG_ACPI_DOCK. This leads to warnings from:
gcc (GCC) 4.6.1
such as:
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 *’
Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
---
include/acpi/acpi_drivers.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index e49c36d..bb145e4 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -144,7 +144,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
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;
--
1.7.6
--
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] acpi: Fix build warnings for missing const on register_hotplug_dock_device static inline version
@ 2011-08-14 15:04 ` Kevin Winchester
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Winchester @ 2011-08-14 15:04 UTC (permalink / raw)
To: lenb; +Cc: Kevin Winchester, linux-acpi, linux-kernel
commit 9c8b04be443b33939f374a811c82abeebe0a61d1
Author: Vasiliy Kulikov <segoon@openwall.com>
Date: Sat Jun 25 21:07:52 2011 +0400
ACPI: constify ops structs
missed the static inline definition in include/acpi/acpi_drivers.h
for !CONFIG_ACPI_DOCK. This leads to warnings from:
gcc (GCC) 4.6.1
such as:
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 *’
Signed-off-by: Kevin Winchester <kjwinchester@gmail.com>
---
include/acpi/acpi_drivers.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index e49c36d..bb145e4 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -144,7 +144,7 @@ static inline void unregister_dock_notifier(struct notifier_block *nb)
{
}
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;
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-14 15:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-14 15:04 [PATCH] acpi: Fix build warnings for missing const on register_hotplug_dock_device static inline version Kevin Winchester
2011-08-14 15:04 ` Kevin Winchester
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.