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]
Date:	Wed, 12 Jan 2011 21:35:55 +0100
From:	"Rafael J. Wysocki" <rjw@...k.pl>
To:	Randy Dunlap <randy.dunlap@...cle.com>
Cc:	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-next@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	Jiri Slaby <jslaby@...e.cz>, lenb@...nel.org,
	linux-acpi@...r.kernel.org
Subject: Re: [PATCH -next] x86/e820: fix build when ACPI is disabled

On Wednesday, January 12, 2011, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@...cle.com>
> 
> Fix build error when CONFIG_ACPI is not enabled:
> 
> arch/x86/kernel/e820.c:734: error:implicit declaration of function 'suspend_nvs_register'
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@...cle.com>
> ---
>  include/linux/acpi.h |    5 +++++
>  1 file changed, 5 insertions(+)
> 
> --- linux-next-20110112.orig/include/linux/acpi.h
> +++ linux-next-20110112/include/linux/acpi.h
> @@ -360,5 +360,10 @@ static inline int acpi_table_parse(char 
>  {
>  	return -1;
>  }
> +
> +static inline int suspend_nvs_register(unsigned long a, unsigned long b)
> +{
> +	return 0;
> +}
>  #endif	/* !CONFIG_ACPI */
>  #endif	/*_LINUX_ACPI_H*/

I'd prefer the appended patch (it also should fix the problem indicated by Jiri).

Does it work for you?

Rafael


---
 drivers/acpi/internal.h |    2 +-
 include/linux/acpi.h    |   19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)

Index: linux-2.6/drivers/acpi/internal.h
===================================================================
--- linux-2.6.orig/drivers/acpi/internal.h
+++ linux-2.6/drivers/acpi/internal.h
@@ -91,7 +91,7 @@ void suspend_nvs_restore(void);
 static inline int acpi_sleep_proc_init(void) { return 0; }
 static inline int suspend_nvs_alloc(void) { return 0; }
 static inline void suspend_nvs_free(void) {}
-static inline int suspend_nvs_save(void) {}
+static inline int suspend_nvs_save(void) { return 0; }
 static inline void suspend_nvs_restore(void) {}
 #endif
 
Index: linux-2.6/include/linux/acpi.h
===================================================================
--- linux-2.6.orig/include/linux/acpi.h
+++ linux-2.6/include/linux/acpi.h
@@ -254,15 +254,6 @@ void __init acpi_old_suspend_ordering(vo
 void __init acpi_nvs_nosave(void);
 #endif /* CONFIG_PM_SLEEP */
 
-#ifdef CONFIG_ACPI_SLEEP
-int suspend_nvs_register(unsigned long start, unsigned long size);
-#else
-static inline int suspend_nvs_register(unsigned long a, unsigned long b)
-{
-	return 0;
-}
-#endif
-
 struct acpi_osc_context {
 	char *uuid_str; /* uuid string */
 	int rev;
@@ -361,4 +352,14 @@ static inline int acpi_table_parse(char
 	return -1;
 }
 #endif	/* !CONFIG_ACPI */
+
+#ifdef CONFIG_ACPI_SLEEP
+int suspend_nvs_register(unsigned long start, unsigned long size);
+#else
+static inline int suspend_nvs_register(unsigned long a, unsigned long b)
+{
+	return 0;
+}
+#endif
+
 #endif	/*_LINUX_ACPI_H*/
--
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