Fix build error due to not including <linux/errno.h>
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
@@ -11,6 +11,7 @@#define _SYSFS_H_#include <linux/compiler.h> +#include <linux/errno.h> #include <linux/list.h> #include <asm/atomic.h>
Quoted 12 lines · Ralf Baechle
Since
d9a9cdfb078d755e648d53ec25b7370f84ee5729<linux/sysfs.h> is using ENOSYS without including <linux/errno.h> ifCONFIG_SYSFSis disabled.Fixed by including <
linux/errno.h>.Signed-off-by Ralf Baechle <[email protected]>include/linux/sysfs.h +0
-0
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
Quoted 3 lines · Alan Stern
Acked-by Alan Stern <[email protected]>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
Quoted 11 lines · On Mon, 19 Mar 2007 00:44:43 +0000 Ralf Baechle <[email protected]> wrote:
Quoted 3 lines · Alan Stern
Acked-by Alan Stern <[email protected]>Thank you for spotting and fixing this.
It's the second time I've fixed a
CONFIG_SYSFS=nbug. 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 enableCONFIG_SYSFSat 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.
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 -0800If 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...
____