From: Andrew Morton mips allnoconfig: In file included from include/linux/kobject.h:21, from include/linux/slub_def.h:12, from include/linux/slab.h:123, from include/linux/percpu.h:5, from include/linux/rcupdate.h:39, from include/linux/pid.h:4, from include/linux/sched.h:74, from arch/mips/kernel/asm-offsets.c:13: include/linux/sysfs.h: In function `sysfs_rename_dir': include/linux/sysfs.h:141: error: implicit declaration of function `kobject_set_name' In file included from include/linux/slub_def.h:12, from include/linux/slab.h:123, from include/linux/percpu.h:5, from include/linux/rcupdate.h:39, from include/linux/pid.h:4, from include/linux/sched.h:74, from arch/mips/kernel/asm-offsets.c:13: include/linux/kobject.h: At top level: include/linux/kobject.h:74: error: conflicting types for 'kobject_set_name' include/linux/kobject.h:74: note: a parameter list with an ellipsis can't match an empty parameter name list declaration include/linux/sysfs.h:141: error: previous implicit declaration of 'kobject_set_name' was here make[1]: *** [arch/mips/kernel/asm-offsets.s] Error 1 make: *** [prepare0] Error 2 We cannot include kobject.h from sysfs.h because kobject.h includes sysfs.h. Just uninline it (fixes everything, doesn't it?) lib/kobject.c doesn't seem an appropriate file :( Please fold this (or similar) into the base patch to avoid breaking bisection. Cc: Eric W. Biederman Cc: Greg Kroah-Hartman Cc: Stephen Rothwell Signed-off-by: Andrew Morton --- include/linux/sysfs.h | 6 ++---- lib/kobject.c | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff -puN include/linux/sysfs.h~fix-kobject-fix-kobject_rename-and-config_sysfs include/linux/sysfs.h --- a/include/linux/sysfs.h~fix-kobject-fix-kobject_rename-and-config_sysfs +++ a/include/linux/sysfs.h @@ -138,10 +138,6 @@ static inline void sysfs_remove_dir(stru { } -static inline int sysfs_rename_dir(struct kobject *kobj, const char *new_name) -{ - return kobject_set_name(kobj, "%s", new_name); -} static inline int sysfs_move_dir(struct kobject *kobj, struct kobject *new_parent_kobj) @@ -228,6 +224,8 @@ static inline void sysfs_printk_last_fil { } +int sysfs_rename_dir(struct kobject *kobj, const char *new_name); + #endif /* CONFIG_SYSFS */ #endif /* _SYSFS_H_ */ diff -puN lib/kobject.c~fix-kobject-fix-kobject_rename-and-config_sysfs lib/kobject.c --- a/lib/kobject.c~fix-kobject-fix-kobject_rename-and-config_sysfs +++ a/lib/kobject.c @@ -883,6 +883,14 @@ struct kset *kset_create_and_add(const c } return kset; } + +#ifndef CONFIG_SYSFS +int sysfs_rename_dir(struct kobject *kobj, const char *new_name) +{ + return kobject_set_name(kobj, "%s", new_name); +} +#endif + EXPORT_SYMBOL_GPL(kset_create_and_add); EXPORT_SYMBOL(kobject_get); _