From edf5636b266bf75859048a948c129b9eadd70e1e Mon Sep 17 00:00:00 2001 From: YONETANI Tomokazu Date: Sun, 30 Oct 2005 04:20:49 +0000 Subject: [PATCH] - kill `unused variable' warning pointed out by sephe@ - kill `defined but not used' warning by #ifdef'ing out acpi_wake_set_sysctl() definition --- sys/dev/acpica5/Osd/OsdSynch.c | 4 ++-- sys/dev/acpica5/acpi.c | 6 +++++- sys/i386/acpica5/acpi_wakeup.c | 3 ++- sys/platform/pc32/acpica5/acpi_wakeup.c | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/dev/acpica5/Osd/OsdSynch.c b/sys/dev/acpica5/Osd/OsdSynch.c index fb23eec89a..0be7f28b2a 100644 --- a/sys/dev/acpica5/Osd/OsdSynch.c +++ b/sys/dev/acpica5/Osd/OsdSynch.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/Osd/OsdSynch.c,v 1.21 2004/05/05 20:07:52 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/Osd/OsdSynch.c,v 1.5 2005/06/04 14:25:45 corecode Exp $ + * $DragonFly: src/sys/dev/acpica5/Osd/OsdSynch.c,v 1.6 2005/10/30 04:20:49 y0netan1 Exp $ */ /* @@ -135,7 +135,7 @@ AcpiOsDeleteSemaphore(ACPI_HANDLE Handle) #if __FreeBSD_version >= 500000 mtx_destroy(&as->as_mtx); #endif - free(Handle, M_ACPISEM); + free(as, M_ACPISEM); #endif /* !ACPI_NO_SEMAPHORES */ return_ACPI_STATUS (AE_OK); diff --git a/sys/dev/acpica5/acpi.c b/sys/dev/acpica5/acpi.c index fad0978717..80f83d5326 100644 --- a/sys/dev/acpica5/acpi.c +++ b/sys/dev/acpica5/acpi.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpi.c,v 1.157 2004/06/05 09:56:04 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.15 2005/10/28 03:25:37 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpi.c,v 1.16 2005/10/30 04:20:49 y0netan1 Exp $ */ #include "opt_acpi.h" @@ -140,7 +140,9 @@ static ACPI_STATUS acpi_wake_limit(ACPI_HANDLE h, UINT32 level, void *context, void **status); static int acpi_wake_limit_walk(int sstate); static int acpi_wake_sysctl_walk(device_t dev); +#ifdef dfly_notyet static int acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS); +#endif static void acpi_system_eventhandler_sleep(void *arg, int state); static void acpi_system_eventhandler_wakeup(void *arg, int state); static int acpi_supported_sleep_state_sysctl(SYSCTL_HANDLER_ARGS); @@ -2003,6 +2005,7 @@ acpi_wake_sysctl_walk(device_t dev) return (0); } +#ifdef dfly_notyet /* Enable or disable wake from userland. */ static int acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS) @@ -2021,6 +2024,7 @@ acpi_wake_set_sysctl(SYSCTL_HANDLER_ARGS) return (acpi_wake_set_enable(dev, enable)); } +#endif /* dfly_notyet */ /* Parse a device's _PRW into a structure. */ static int diff --git a/sys/i386/acpica5/acpi_wakeup.c b/sys/i386/acpica5/acpi_wakeup.c index be98952ad8..f130d56f7a 100644 --- a/sys/i386/acpica5/acpi_wakeup.c +++ b/sys/i386/acpica5/acpi_wakeup.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.33 2004/05/06 02:18:58 njl Exp $ - * $DragonFly: src/sys/i386/acpica5/Attic/acpi_wakeup.c,v 1.8 2005/09/23 02:22:48 dillon Exp $ + * $DragonFly: src/sys/i386/acpica5/Attic/acpi_wakeup.c,v 1.9 2005/10/30 04:20:49 y0netan1 Exp $ */ #include @@ -45,6 +45,7 @@ #include #include #include +#include #include "acpi.h" #include diff --git a/sys/platform/pc32/acpica5/acpi_wakeup.c b/sys/platform/pc32/acpica5/acpi_wakeup.c index 981f28688a..12715f54a7 100644 --- a/sys/platform/pc32/acpica5/acpi_wakeup.c +++ b/sys/platform/pc32/acpica5/acpi_wakeup.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.33 2004/05/06 02:18:58 njl Exp $ - * $DragonFly: src/sys/platform/pc32/acpica5/acpi_wakeup.c,v 1.8 2005/09/23 02:22:48 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/acpica5/acpi_wakeup.c,v 1.9 2005/10/30 04:20:49 y0netan1 Exp $ */ #include @@ -45,6 +45,7 @@ #include #include #include +#include #include "acpi.h" #include -- 2.11.4.GIT