From patchwork Tue Aug 23 09:28:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikael Pettersson X-Patchwork-Id: 1087942 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7NA0GiB029120 for ; Tue, 23 Aug 2011 10:00:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751480Ab1HWKAO (ORCPT ); Tue, 23 Aug 2011 06:00:14 -0400 Received: from fanny.its.uu.se ([130.238.4.241]:4976 "EHLO fanny.its.uu.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982Ab1HWKAO (ORCPT ); Tue, 23 Aug 2011 06:00:14 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 23 Aug 2011 10:00:16 +0000 (UTC) X-Greylist: delayed 1921 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Aug 2011 06:00:14 EDT Received: from fanny.its.uu.se (localhost [127.0.0.1]) by fanny.its.uu.se (Postfix) with ESMTP id 692DF627B; Tue, 23 Aug 2011 11:28:10 +0200 (MSZ) Received: from pilspetsen.it.uu.se (pilspetsen.it.uu.se [130.238.18.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fanny.its.uu.se (Postfix) with ESMTP id 2AB0B6216; Tue, 23 Aug 2011 11:28:10 +0200 (MSZ) Received: (from mikpe@localhost) by pilspetsen.it.uu.se (8.14.4+Sun/8.14.4) id p7N9S9rK024182; Tue, 23 Aug 2011 11:28:09 +0200 (MEST) X-Authentication-Warning: pilspetsen.it.uu.se: mikpe set sender to mikpe@it.uu.se using -f MIME-Version: 1.0 Message-ID: <20051.29353.630250.758016@pilspetsen.it.uu.se> Date: Tue, 23 Aug 2011 11:28:09 +0200 From: Mikael Pettersson To: linux-acpi@vger.kernel.org Subject: [PATCH] correct register_hotplug_dock_device() prototype for CONFIG_ACPI_DOCK=n Cc: linux-kernel@vger.kernel.org X-Mailer: VM 7.17 under Emacs 20.7.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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 --- -- 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 --- 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;