public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org, Len Brown <len.brown@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] ACPI suspend: Fox compilation for ACPI_SLEEP unset and XEN_SAVE_RESTORE set
Date: Thu, 23 Oct 2008 21:46:43 +0200	[thread overview]
Message-ID: <200810232146.44394.rjw@sisk.pl> (raw)
In-Reply-To: <b849075c0e08ea43400c1341c78eeca76ab08d8a.1224743917.git.len.brown@intel.com>

On Thursday, 23 of October 2008, Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
> 
> drivers/acpi/sleep/main.c:27: warning: ‘acpi_target_sleep_state’ defined but not used

Er, wrong.

This breaks compilation for ACPI_SLEEP=n and XEN_SAVE_RESTORE=y.

The patch below fixes the breakage.

> Signed-off-by: Len Brown <len.brown@intel.com>
> ---
>  drivers/acpi/sleep/main.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c
> index 7603788..26571ba 100644
> --- a/drivers/acpi/sleep/main.c
> +++ b/drivers/acpi/sleep/main.c
> @@ -24,7 +24,6 @@
>  #include "sleep.h"
>  
>  u8 sleep_states[ACPI_S_STATE_COUNT];
> -static u32 acpi_target_sleep_state = ACPI_STATE_S0;
>  
>  static void acpi_sleep_tts_switch(u32 acpi_state)
>  {
> @@ -78,6 +77,7 @@ static int acpi_sleep_prepare(u32 acpi_state)
>  }
>  
>  #ifdef CONFIG_ACPI_SLEEP
> +static u32 acpi_target_sleep_state = ACPI_STATE_S0;
>  /*
>   * ACPI 1.0 wants us to execute _PTS before suspending devices, so we allow the
>   * user to request that behavior by using the 'acpi_old_suspend_ordering'

---
From: Rafael J. Wysocki <rjw@sisk.pl>

ACPI suspend: Fox compilation for ACPI_SLEEP unset and XEN_SAVE_RESTORE set

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
 drivers/acpi/sleep/main.c |    2 ++
 1 file changed, 2 insertions(+)

Index: linux-2.6/drivers/acpi/sleep/main.c
===================================================================
--- linux-2.6.orig/drivers/acpi/sleep/main.c
+++ linux-2.6/drivers/acpi/sleep/main.c
@@ -163,6 +163,8 @@ static void acpi_pm_end(void)
 	acpi_target_sleep_state = ACPI_STATE_S0;
 	acpi_sleep_tts_switch(acpi_target_sleep_state);
 }
+#else /* !CONFIG_ACPI_SLEEP */
+#define acpi_target_sleep_state	ACPI_STATE_S0
 #endif /* CONFIG_ACPI_SLEEP */
 
 #ifdef CONFIG_SUSPEND
--
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

  reply	other threads:[~2008-10-23 19:42 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23  6:37 ACPI patches for 2.6.28-rc0 Len Brown
2008-10-23  6:37 ` [PATCH 001/122] Introduce FW_BUG, FW_WARN and FW_INFO to consistenly tell users about BIOS bugs Len Brown
2008-10-23  6:37   ` [PATCH 002/122] ACPI: cpufreq, processor: Detect old BIOS, not supporting CPU freq on a recent CPU Len Brown
2008-10-23  6:37   ` [PATCH 003/122] CPUFREQ: powernow-k8: Try to detect old BIOS, not supporting CPU freq on a recent AMD CPUs Len Brown
2008-10-23  6:37   ` [PATCH 004/122] ACPI: dock: avoid check _STA method Len Brown
2008-10-23  6:37   ` [PATCH 005/122] dock: fix eject request process (2.6.27-rc1 regression) Len Brown
2008-10-23  6:37   ` [PATCH 006/122] dock: add _LCK support Len Brown
2008-10-23  6:37   ` [PATCH 007/122] dock: add bay and battery hotplug support Len Brown
2008-10-23  6:37   ` [PATCH 008/122] ACPI: introduce notifier change to avoid duplicates Len Brown
2008-10-23  6:37   ` [PATCH 009/122] ACPI: fix hotplug race Len Brown
2008-10-23  6:37   ` [PATCH 010/122] libata: remove functions now handed by ACPI dock driver Len Brown
2008-10-23  6:37   ` [PATCH 011/122] dock: introduce .uevent for devices in dock, eg libata Len Brown
2008-10-23  6:37   ` [PATCH 012/122] bay: remove driver, all functions now handled by dock driver Len Brown
2008-10-23  6:37   ` [PATCH 013/122] dock: fix for ATA bay in a dock station Len Brown
2008-10-23  6:37   ` [PATCH 014/122] dock: add 'type' sysfs file Len Brown
2008-10-23  6:37   ` [PATCH 015/122] dock: Shaohua Li is new maintainer Len Brown
2008-10-23  6:37   ` [PATCH 016/122] panasonic-laptop: add Panasonic Let's Note laptop extras driver v0.94 Len Brown
2008-10-23  6:37   ` [PATCH 017/122] ACPI: EC: do transaction from interrupt context Len Brown
2008-10-23  6:37   ` [PATCH 018/122] ACPI: EC: Rename some variables Len Brown
2008-10-23  6:37   ` [PATCH 019/122] ACPI: don't enable control method power button as wakeup device when Fixed Power button is used Len Brown
2008-10-23  6:37   ` [PATCH 020/122] acer-wmi: Add rfkill support for wireless and bluetooth Len Brown
2008-10-23  6:37   ` [PATCH 021/122] acer-wmi: Remove wireless and bluetooth sysfs entries Len Brown
2008-10-23  6:37   ` [PATCH 022/122] ACPI: WMI: Enable event methods when registering notifiers Len Brown
2008-10-23  6:37   ` [PATCH 023/122] ACPI: fix FADT parsing Len Brown
2008-10-23  6:37   ` [PATCH 024/122] fujitsu-laptop: better handling of P8010 hotkey Len Brown
2008-10-23  6:37   ` [PATCH 025/122] eeepc-laptop: Use standard interfaces Len Brown
2008-10-23  6:38   ` [PATCH 026/122] x86: remove magic number from ACPI sleep stack buffer Len Brown
2008-10-23  6:38   ` [PATCH 027/122] x86: trim " Len Brown
2008-10-23  6:38   ` [PATCH 028/122] ACPI: acpi_driver_data could only be applied to acpi_device Len Brown
2008-10-23  6:38   ` [PATCH 029/122] ACPI: toshiba_acpi.c fix sparse signedness mismatch warnings Len Brown
2008-10-23  6:38   ` [PATCH 030/122] ACPI: catch calls of acpi_driver_data on pointer of wrong type Len Brown
2008-10-23  6:38   ` [PATCH 031/122] toshiba_acpi: depends on INPUT Len Brown
2008-10-23  6:38   ` [PATCH 032/122] PNP: fix debug formatting (cosmetic) Len Brown
2008-10-23  6:38   ` [PATCH 033/122] PNPACPI: use dev_printk when possible Len Brown
2008-10-23  6:38   ` [PATCH 034/122] PNP: convert the last few pnp_info() uses to printk() Len Brown
2008-10-23  6:38   ` [PATCH 035/122] PNP: use new vsprintf symbolic function pointer format Len Brown
2008-10-23  6:38   ` [PATCH 036/122] PNP: remove some uses of DEBUG ifdef Len Brown
2008-10-23  6:38   ` [PATCH 037/122] PNP: add CONFIG_PNP_DEBUG_MESSAGES and pnp_dbg() Len Brown
2008-10-23  6:38   ` [PATCH 038/122] PNP: convert to using pnp_dbg() Len Brown
2008-10-23  6:38   ` [PATCH 039/122] PNP: remove old CONFIG_PNP_DEBUG option Len Brown
2008-10-23  6:38   ` [PATCH 040/122] ACPI: don't load acpi_cpufreq if acpi=off Len Brown
2008-10-23  6:38   ` [PATCH 041/122] ACPI: remove unused have_arch_parse_srat Len Brown
2008-10-23  6:38   ` [PATCH 042/122] acer-wmi: Remove private workqueue Len Brown
2008-10-23  6:38   ` [PATCH 043/122] Subject: ACPI dock: Use ACPI_EXCEPTION instead of printk(KERN_ERR Len Brown
2008-10-23  6:38   ` [PATCH 044/122] ACPI: Enable EC device immediately after ACPI full initialization Len Brown
2008-10-23  6:38   ` [PATCH 045/122] ACPI: Change acpi_evaluate_integer to support 64-bit on 32-bit kernels Len Brown
2008-10-23  6:38   ` [PATCH 046/122] fix CONFIG_MMCONFIG=n build warning Len Brown
2008-10-23  6:38   ` [PATCH 047/122] ACPI: Clear WAK_STS on resume Len Brown
2008-10-23  6:38   ` [PATCH 048/122] sony-laptop: newline-terminate the printk for backlight change failure Len Brown
2008-10-23  6:38   ` [PATCH 049/122] x86: SB600: skip ACPI IRQ0 override if it is not routed to INT2 of IOAPIC Len Brown
2008-10-23  6:38   ` [PATCH 050/122] cpuidle: use last_state which can reflect the actual state entered Len Brown
2008-10-23  6:38   ` [PATCH 051/122] cpuidle: update the last_state acpi cpuidle reflecting " Len Brown
2008-10-23  6:38   ` [PATCH 052/122] ACPI: EC: Check for IBF=0 periodically if not in GPE mode Len Brown
2008-10-23  6:38   ` [PATCH 053/122] cpuidle: upon BIOS bug, default to default_idle rather than polling Len Brown
2008-10-23  6:38   ` [PATCH 054/122] ACPI: Add the support for _TTS object Len Brown
2008-10-23  6:38   ` [PATCH 055/122] ACPI suspend: Always use the 32-bit waking vector Len Brown
2008-10-23  6:38   ` [PATCH 056/122] ACPI Suspend: Enable ACPI during resume if SCI_EN is not set Len Brown
2008-10-23  6:38   ` [PATCH 057/122] ACPI suspend: Blacklist HP xw4600 Workstation for old code ordering Len Brown
2008-10-23  6:38   ` [PATCH 058/122] don't load asus-acpi if model is not supported Len Brown
2008-10-23  6:38   ` [PATCH 059/122] ACPI: Ignore AE_NOT_FOUND error of EC _REG method and continue to initialize EC Len Brown
2008-10-23  6:38   ` [PATCH 060/122] ACPI: Allow overriding to higher critical trip point Len Brown
2008-10-23  6:38   ` [PATCH 061/122] asus-laptop: Add support for P30/P35 Len Brown
2008-10-23  6:38   ` [PATCH 062/122] asus_acpi: whitespace and comment cleanup Len Brown
2008-10-23  6:38   ` [PATCH 063/122] ACPI: Ingore the RESET_REG_SUP bit when using ACPI reset mechanism Len Brown
2008-10-23  6:38   ` [PATCH 064/122] x86 allow modules to register idle notifiers Len Brown
2008-10-23  6:38   ` [PATCH 065/122] i7300_idle driver v1.55 Len Brown
2008-10-23  6:38   ` [PATCH 066/122] ACPI suspend: Fix CONFIG_ACPI_SLEEP dependence and some compilation warnings Len Brown
2008-10-23  6:38   ` [PATCH 067/122] asus-laptop: Fix the led behavior with value > 1 Len Brown
2008-10-23  6:38   ` [PATCH 068/122] ACPI: Add expand acpi.debug_layer in kernel-parameters.txt Len Brown
2008-10-23  6:38   ` [PATCH 069/122] ACPI: replace AE_BAD_ADDRESS exception code with AE_ERROR Len Brown
2008-10-23  6:38   ` [PATCH 070/122] ACPI: Get the device power state in the course of scanning device Len Brown
2008-10-23  6:38   ` [PATCH 071/122] ACPI: Attach the ACPI device to the ACPI handle as early as possible Len Brown
2008-10-23  6:38   ` [PATCH 072/122] ACPI: Add "acpi.power_nocheck=1" to disable power state check in power transition Len Brown
2008-10-23  6:38   ` [PATCH 073/122] ACPI: Add DMI check " Len Brown
2008-10-23  6:38   ` [PATCH 074/122] ACPI : Load device driver according to the status of acpi device Len Brown
2008-10-23  6:38   ` [PATCH 075/122] ACPI: remove unused acpi_is_child_device() Len Brown
2008-10-23  6:38   ` [PATCH 076/122] ACPI: Fix possible null ptr dereference Len Brown
2008-10-23  6:38   ` [PATCH 077/122] ACPI: thinkpad-acpi: attempt to preserve fan state on resume Len Brown
2008-10-23  6:38   ` [PATCH 078/122] ACPI: thinkpad-acpi: trivial fix of error message Len Brown
2008-10-23  6:38   ` [PATCH 079/122] ACPI: thinkpad-acpi: Remove duplicate line Len Brown
2008-10-23  6:38   ` [PATCH 080/122] ACPI: thinkpad-acpi: Remove firmware backlight delays for Intel ACPI IGD OpRegion Len Brown
2008-10-23  6:38   ` [PATCH 081/122] panasonic-laptop: depends on ACPI Len Brown
2008-10-23  6:38   ` [PATCH 082/122] ACPICA: Copy dynamically loaded tables to local buffer Len Brown
2008-10-23  6:38   ` [PATCH 083/122] ACPICA: Add check for invalid handle in acpi_get_object_info Len Brown
2008-10-23  6:38   ` [PATCH 084/122] ACPICA: Allow same ACPI table to be loaded/unloaded more than once Len Brown
2008-10-23  6:38   ` [PATCH 085/122] ACPICA: Fix wrong resource descriptor length for 64-bit build Len Brown
2008-10-23  6:39   ` [PATCH 086/122] ACPICA: Fix table compare code, length then data Len Brown
2008-10-23  6:39   ` [PATCH 087/122] ACPICA: Return status from global init function Len Brown
2008-10-23  6:39   ` [PATCH 088/122] ACPICA: Add function to dereference returned reference objects Len Brown
2008-10-23  6:39   ` [PATCH 089/122] ACPICA: Fix warning for 64-bit build Len Brown
2008-10-23  6:39   ` [PATCH 090/122] ACPICA: Cleanup macro definition file Len Brown
2008-10-23  6:39   ` [PATCH 091/122] ACPICA: Return method arg count from acpi_get_object_info Len Brown
2008-10-23  6:39   ` [PATCH 092/122] ACPICA: Update version to 20080701 Len Brown
2008-10-23  6:39   ` [PATCH 093/122] ACPICA: Add function to decode reference obj types to strings Len Brown
2008-10-23  6:39   ` [PATCH 094/122] ACPICA: Improve object conversion error messages Len Brown
2008-10-23  6:39   ` [PATCH 095/122] ACPICA: x2APIC support: changes for MADT and SRAT ACPI tables Len Brown
2008-10-23  6:39   ` [PATCH 096/122] ACPICA: Update version to 20080729 Len Brown
2008-10-23  6:39   ` [PATCH 097/122] ACPICA: add preemption point after each opcode parse Len Brown
2008-10-23  6:39   ` [PATCH 098/122] ACPI: replace ACPI_DEBUG_PRINT((ACPI_DB_ERROR, ...) with printk Len Brown
2008-10-23  6:39   ` [PATCH 099/122] ACPICA: Remove obsolete debug levels (WARN and ERROR) Len Brown
2008-10-23  6:39   ` [PATCH 100/122] ACPICA: Add namespace node to operand object union Len Brown
2008-10-23  6:39   ` [PATCH 101/122] ACPICA: Remove obsolete exception codes Len Brown
2008-10-23  6:39   ` [PATCH 102/122] ACPICA: Disallow evaluation of named object types with no value Len Brown
2008-10-23  6:39   ` [PATCH 103/122] ACPICA: Reduce error to warning for incorrect method arg count Len Brown
2008-10-23  6:39   ` [PATCH 104/122] ACPICA: Update for Reference ACPI_OPERAND_OBJECT Len Brown
2008-10-23  6:39   ` [PATCH 105/122] ACPICA: Update comments - no functional changes Len Brown
2008-10-23  6:39   ` [PATCH 106/122] ACPICA: Cleanup for internal Reference Object Len Brown
2008-10-23  6:39   ` [PATCH 107/122] ACPICA: Fix possible memory leak in acpi_ns_get_external_pathname Len Brown
2008-10-23  6:39   ` [PATCH 108/122] ACPICA: Update version to 20080829 Len Brown
2008-10-23  6:39   ` [PATCH 109/122] ACPICA: Remove unused ACPI register bit definition Len Brown
2008-10-23  6:39   ` [PATCH 110/122] ACPICA: Fix fault after mem allocation failure in AML parser Len Brown
2008-10-23  6:39   ` [PATCH 111/122] ACPICA: Fix possible memory leak, error exit path Len Brown
2008-10-23  6:39   ` [PATCH 112/122] ACPICA: Optimize buffer allocation procedure Len Brown
2008-10-23  6:39   ` [PATCH 113/122] ACPICA: Fixed a couple memory leaks associated with "implicit return" Len Brown
2008-10-23  6:39   ` [PATCH 114/122] ACPICA: Fix for implicit return compatibility Len Brown
2008-10-23  6:39   ` [PATCH 115/122] ACPICA: New: Validation for predefined ACPI methods/objects Len Brown
2008-10-23  6:39   ` [PATCH 116/122] ACPICA: Add support for zero-length buffer-to-string conversions Len Brown
2008-10-23  6:39   ` [PATCH 117/122] ACPICA: Update version to 20080926 Len Brown
2008-10-23  6:39   ` [PATCH 118/122] panasonic-laptop: fix build Len Brown
2008-10-23  6:39   ` [PATCH 119/122] intel_menlo: fix build warning Len Brown
2008-10-23  6:39   ` [PATCH 120/122] ACPI suspend: fix build warning when CONFIG_ACPI_SLEEP=n Len Brown
2008-10-23 19:46     ` Rafael J. Wysocki [this message]
2008-10-23  6:39   ` [PATCH 121/122] ACPI: hack around sysfs warning with link order Len Brown
2008-10-23  6:39   ` [PATCH 122/122] ACPI: fix ia64 build warning Len Brown

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=200810232146.44394.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=len.brown@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@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