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-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201201092314.20561.rjw@sisk.pl>
Date:	Mon, 9 Jan 2012 23:14:20 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Kukjin Kim <kgene.kim@...sung.com>
Cc:	linux-kernel@...r.kernel.org,
	Linus <torvalds@...ux-foundation.org>,
	linux-samsung-soc@...r.kernel.org
Subject: Re: Build error at drivers/base/power/domain_governor.c when PM_RUNTIME is not set

On Monday, January 09, 2012, Kukjin Kim wrote:
> Hi Rafael,
> 
> This is just reporting of build error.
> 
> Current mainline happens build error at drivers/base/power/domain_governor.c
> file like following when CONFIG_PM_RUNTIME is not set. For example, it
> happens with s3c6400_defconfig now.
> 
> drivers/base/power/domain_governor.c: In function 'default_stop_ok':
> drivers/base/power/domain_governor.c:25: error: 'struct dev_pm_info' has no
> member named 'max_time_suspended_ns'
> drivers/base/power/domain_governor.c:29: error: 'struct dev_pm_info' has no
> member named 'max_time_suspended_ns'
> drivers/base/power/domain_governor.c: In function 'default_power_down_ok':
> drivers/base/power/domain_governor.c:94: error: 'struct dev_pm_info' has no
> member named 'max_time_suspended_ns'
> drivers/base/power/domain_governor.c:98: error: 'struct dev_pm_info' has no
> member named 'max_time_suspended_ns'
> drivers/base/power/domain_governor.c:100: error: 'struct dev_pm_info' has no
> member named 'suspend_time'

The appended patch fixes the problem for me, can you please test it?

Rafael

---
 drivers/base/power/domain_governor.c |   24 +++++++++++++++++++-----
 1 file changed, 19 insertions(+), 5 deletions(-)

Index: linux/drivers/base/power/domain_governor.c
===================================================================
--- linux.orig/drivers/base/power/domain_governor.c
+++ linux/drivers/base/power/domain_governor.c
@@ -12,6 +12,8 @@
 #include <linux/pm_qos.h>
 #include <linux/hrtimer.h>
 
+#ifdef CONFIG_PM_RUNTIME
+
 /**
  * default_stop_ok - Default PM domain governor routine for stopping devices.
  * @dev: Device to check.
@@ -137,16 +139,28 @@ static bool default_power_down_ok(struct
 	return true;
 }
 
-struct dev_power_governor simple_qos_governor = {
-	.stop_ok = default_stop_ok,
-	.power_down_ok = default_power_down_ok,
-};
-
 static bool always_on_power_down_ok(struct dev_pm_domain *domain)
 {
 	return false;
 }
 
+#else /* !CONFIG_PM_RUNTIME */
+
+bool default_stop_ok(struct device *dev)
+{
+	return false;
+}
+
+#define default_power_down_ok	NULL
+#define always_on_power_down_ok	NULL
+
+#endif /* !CONFIG_PM_RUNTIME */
+
+struct dev_power_governor simple_qos_governor = {
+	.stop_ok = default_stop_ok,
+	.power_down_ok = default_power_down_ok,
+};
+
 /**
  * pm_genpd_gov_always_on - A governor implementing an always-on policy
  */
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ