linux-next: build failure after merge of the userns tree

From: Stephen Rothwell
Date: Mon May 25 2015 - 06:39:22 EST


Hi Eric,

After merging the userns tree, today's linux-next build (powerpc allnoconfig)
failed like this:

In file included from include/linux/kobject.h:21:0,
from include/linux/device.h:17,
from arch/powerpc/include/asm/io.h:27,
from arch/powerpc/include/asm/pgtable-ppc32.h:9,
from arch/powerpc/include/asm/pgtable.h:19,
from include/linux/mm.h:53,
from include/linux/pid_namespace.h:6,
from include/linux/ptrace.h:8,
from arch/powerpc/mm/fault.c:24:
include/linux/sysfs.h: In function 'sysfs_remove_mount_point':
include/linux/sysfs.h:314:2: error: 'return' with a value, in function returning void [-Werror]
return 0;
^

and many more :-(

Caused by commit f7e299595408 ("sysfs: Add support for permanently
empty directories to serve as mount points.").

I have added the following fix patch for today:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Mon, 25 May 2015 20:20:44 +1000
Subject: [PATCH] sysfs: void functions do not return values

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
include/linux/sysfs.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 3e7e41acc451..9f65758311a4 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -311,7 +311,6 @@ static inline int sysfs_create_mount_point(struct kobject *parent_kobj,
static inline void sysfs_remove_mount_point(struct kobject *parent_kobj,
const char *name)
{
- return 0;
}

static inline int sysfs_create_file_ns(struct kobject *kobj,
--
2.1.4

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

Attachment: pgplnx46DT_Yg.pgp
Description: OpenPGP digital signature