lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230427050603.612145-1-kai.heng.feng@canonical.com>
Date:   Thu, 27 Apr 2023 13:06:02 +0800
From:   Kai-Heng Feng <kai.heng.feng@...onical.com>
To:     jejb@...ux.ibm.com, martin.petersen@...cle.com
Cc:     bblock@...ux.ibm.com, acelan.kao@...onical.com,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 1/2] PM: suspend: Define pm_suspend_target_state

Define pm_suspend_target_state so it can still be used when
CONFIG_SUSPEND or CONFIG_PM_SLEEP is not set.

Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
---
v3:
 - New patch to resolve undefined pm_suspend_target_state.

 drivers/base/power/wakeup.c | 5 -----
 include/linux/suspend.h     | 1 +
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c
index 7cc0c0cf8eaa..a917219feea6 100644
--- a/drivers/base/power/wakeup.c
+++ b/drivers/base/power/wakeup.c
@@ -19,11 +19,6 @@
 
 #include "power.h"
 
-#ifndef CONFIG_SUSPEND
-suspend_state_t pm_suspend_target_state;
-#define pm_suspend_target_state	(PM_SUSPEND_ON)
-#endif
-
 #define list_for_each_entry_rcu_locked(pos, head, member) \
 	list_for_each_entry_rcu(pos, head, member, \
 		srcu_read_lock_held(&wakeup_srcu))
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index cfe19a028918..ff64a596be4b 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -530,6 +530,7 @@ static inline void ksys_sync_helper(void) {}
 
 #define pm_notifier(fn, pri)	do { (void)(fn); } while (0)
 
+#define pm_suspend_target_state	(PM_SUSPEND_ON)
 static inline bool pm_wakeup_pending(void) { return false; }
 static inline void pm_system_wakeup(void) {}
 static inline void pm_wakeup_clear(bool reset) {}
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ