mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kevin Winchester <kjwinchester@gmail.com>
To: lenb@kernel.org
Cc: Kevin Winchester <kjwinchester@gmail.com>,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] acpi: Fix build warnings for missing const on register_hotplug_dock_device static inline version
Date: Sun, 14 Aug 2011 12:04:03 -0300	[thread overview]
Message-ID: <1313334243-17765-1-git-send-email-kjwinchester@gmail.com> (raw)

    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


                 reply	other threads:[~2011-08-14 15:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313334243-17765-1-git-send-email-kjwinchester@gmail.com \
    --to=kjwinchester@gmail.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®