Skip to contentSkip to conversation

Fix build error due to not including <linux/errno.h>

PATCH In review Ralf Baechle 4 participants 5 messages Mar 18, 2007 – Apr 1, 2007 Driver core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix build error due to not including <linux/errno.h>

Since d9a9cdfb078d755e648d53ec25b7370f84ee5729 <linux/sysfs.h> is using ENOSYS without including <linux/errno.h> if CONFIG_SYSFS is disabled.

Fixed by including <linux/errno.h>.

include/linux/sysfs.h +1 -0
index 0544edd..fea9a6b 100644
@@ -11,6 +11,7 @@
 #define _SYSFS_H_
 
 #include <linux/compiler.h>
+#include <linux/errno.h>
 #include <linux/list.h>
 #include <asm/atomic.h>
 
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Ralf Baechle

Since d9a9cdfb078d755e648d53ec25b7370f84ee5729 <linux/sysfs.h> is using ENOSYS without including <linux/errno.h> if CONFIG_SYSFS is disabled.

Fixed by including <linux/errno.h>.

include/linux/sysfs.h +0 -0
index 0544edd..fea9a6b 100644

include/linux/sysfs.h line 16

Quoted 6 lines
include/linux/sysfs.h +1 -0
@@ -11,6 +11,7 @@
 #define _SYSFS_H_
 
 #include <linux/compiler.h>
+#include <linux/errno.h>
 #include <linux/list.h>
 #include <asm/atomic.h>

Thank you for spotting and fixing this.

Alan Stern

#2 lore raw
Quoted 3 lines · Alan Stern

Thank you for spotting and fixing this.

It's the second time I've fixed a CONFIG_SYSFS=n bug. Of course that sort of thing just shouldn't happen - but the fact that in both cases the bug wasn't noticed for a few days makes me wonder if we simply should always enable CONFIG_SYSFS at some point.

Ralf

#3 lore raw
Quoted 11 lines · On Mon, 19 Mar 2007 00:44:43 +0000 Ralf Baechle <[email protected]> wrote:
Quoted 3 lines · Alan Stern

Thank you for spotting and fixing this.

It's the second time I've fixed a CONFIG_SYSFS=n bug. Of course that sort of thing just shouldn't happen - but the fact that in both cases the bug wasn't noticed for a few days makes me wonder if we simply should always enable CONFIG_SYSFS at some point.

If is a bit of a pain to maintain CONFIG_SYSFS=n. But then, it's realtively easy to fix things when they do break, and sysfs does consume rather a lot of memory at runtime. Hopefully someone out there is finding SYSFS=n to be useful for deeply embedded applications.

#4 lore raw
Quoted 9 lines

From: Andrew Morton
Newsgroups: gmane.linux.kernel
Subject: Re: [PATCH] Fix build error due to not including <linux/errno.h>
Date: Sun, 18 Mar 2007 22:01:48 -0800

If is a bit of a pain to maintain CONFIG_SYSFS=n. But then, it's realtively easy to fix things when they do break, and sysfs does consume rather a lot of memory at runtime. Hopefully someone out there is finding SYSFS=n to be useful for deeply embedded applications.

Actually i've managed to build and run rc5 for five days now. Not so embedded amd64 laptop.

Kudos and thanks to Ralf.

After splitting kobject from sysfs, as it was commented Tejun Heo in the

[RFD driver-core] Lifetime problems of the current driver model

maybe something lightweight can emerge, without current 'features' and going-to-be sysfs-v1,v2,v3 thing...
____