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:	Fri, 25 Jan 2013 12:13:59 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Kristen C. Accardi" <kristen.c.accardi@...el.com>,
	Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: [patch] sysfs: Fix build when sysfs is disabled

"sysfs: Functions for adding/removing symlinks to/from attribute groups" 
causes a build failure when CONFIG_SYSFS is disabled:

drivers/acpi/power.c: In function 'acpi_power_hide_list':
drivers/acpi/power.c:463: error: implicit declaration of function 'sysfs_remove_link_from_group'
drivers/acpi/power.c: In function 'acpi_power_expose_list':
drivers/acpi/power.c:486: error: implicit declaration of function 'sysfs_add_link_to_group'

We need to define empty functions for this config to avoid ifdefs in the 
code.

Signed-off-by: David Rientjes <rientjes@...gle.com>
---
 include/linux/sysfs.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -330,6 +330,18 @@ static inline void sysfs_unmerge_group(struct kobject *kobj,
 {
 }
 
+static inline int sysfs_add_link_to_group(struct kobject *kobj,
+		const char *group_name, struct kobject *target,
+		const char *link_name)
+{
+	return 0;
+}
+
+static inline void sysfs_remove_link_from_group(struct kobject *kobj,
+		const char *group_name, const char *link_name)
+{
+}
+
 static inline void sysfs_notify(struct kobject *kobj, const char *dir,
 				const char *attr)
 {
--
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