Re: 2.6.6-bk-current and no CONFIG_SYSFS gives lib/kobject.c:395: error: void value not ignored as it ought to be

From: Maneesh Soni
Date: Fri May 21 2004 - 17:00:23 EST


On Wed, May 19, 2004 at 08:29:06AM -0600, Steven Cole wrote:
> Using the current 2.6.6-bk kernel, and without CONFIG_SYSFS,
> I get this error:
>
> CC lib/kobject.o
> lib/kobject.c: In function `kobject_rename':
> lib/kobject.c:395: error: void value not ignored as it ought to be
> CC net/core/scm.o
> make[1]: *** [lib/kobject.o] Error 1
>
> With CONFIG_SYSFS=y, the kernel builds OK.
>
> Steven
>

The sysfs_rename_dir() interface was changed recently but I forgto to change
the definition if CONFIG_SYSFS is not define. I think the following patch
should be sufficient.

Thanks
Maneesh


o Fix the definition for sysfs_rename_dir() when CONFIG_SYSFS is not
defined.


include/linux/sysfs.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN include/linux/sysfs.h~fix-CONFIG_SYSFS include/linux/sysfs.h
--- linux-2.6.6-bk6/include/linux/sysfs.h~fix-CONFIG_SYSFS 2004-05-21 16:22:24.000000000 -0500
+++ linux-2.6.6-bk6-maneesh/include/linux/sysfs.h 2004-05-21 16:41:32.000000000 -0500
@@ -80,9 +80,9 @@ static inline void sysfs_remove_dir(stru
;
}

-static inline void sysfs_rename_dir(struct kobject * k, const char *new_name)
+static inline int sysfs_rename_dir(struct kobject * k, const char *new_name)
{
- ;
+ return 0;
}

static inline int sysfs_create_file(struct kobject * k, const struct attribute * a)

_

--
Maneesh Soni
Linux Technology Center,
IBM Software Lab, Bangalore, India
email: maneesh@xxxxxxxxxx
Phone: 91-80-25044999 Fax: 91-80-25268553
T/L : 9243696
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/