2007-01-31 20:47:38

by Grant Coady

[permalink] [raw]
Subject: [RFC PATCH] 20-rc6-mm3: kernel/params.c: compile fail when CONFIG_SYSFS not set

Hi there,

This patch is a guess at what's missing, to fix a compile failure when
CONFIG_SYSFS not set, going by nearby context. Please check (or forward
to someone) as I'm not sure if this is the right thing to do here.
Compile tested.

kernel/profile.c:247: warning: 'profile_flip_buffers' defined but not used
kernel/profile.c:270: warning: 'profile_discard_flip_buffers' defined but not used
kernel/profile.c:337: warning: 'profile_cpu_callback' defined but not used
kernel/params.c:700: error: `module_uevent_ops' undeclared here (not in a function)
kernel/params.c:700: error: initializer element is not constant
kernel/params.c:700: error: (near initialization for `module_subsys.kset.uevent_ops')
kernel/params.c:700: error: initializer element is not constant
kernel/params.c:700: error: (near initialization for `module_subsys.kset')
make[1]: *** [kernel/params.o] Error 1
make: *** [kernel] Error 2

Signed-off-by: Grant Coady <[email protected]>

---
params.c | 4 ++++
1 files changed, 4 insertions(+)

--- linux-2.6.20-rc6-mm3/kernel/params.c 2007-01-30 16:25:34.000000000 +1100
+++ linux-2.6.20-rc6-mm3c/kernel/params.c 2007-02-01 07:25:09.000000000 +1100
@@ -691,6 +691,10 @@
.show = NULL,
.store = NULL,
};
+
+static struct kset_uevent_ops module_uevent_ops = {
+ .filter = NULL,
+};
#endif

static struct kobj_type module_ktype = {


2007-01-31 21:17:04

by Greg KH

[permalink] [raw]
Subject: Re: [RFC PATCH] 20-rc6-mm3: kernel/params.c: compile fail when CONFIG_SYSFS not set

On Thu, Feb 01, 2007 at 07:47:33AM +1100, Grant Coady wrote:
> Hi there,
>
> This patch is a guess at what's missing, to fix a compile failure when
> CONFIG_SYSFS not set, going by nearby context. Please check (or forward
> to someone) as I'm not sure if this is the right thing to do here.
> Compile tested.

This looks correct, I'll add it to my patch queue, thanks.

greg k-h