Re: kbuild: Section mismatch warnings
From: Sam Ravnborg
Date: Sat Feb 18 2006 - 07:12:54 EST
On Fri, Feb 17, 2006 at 07:49:26PM -0500, Dmitry Torokhov wrote:
> On Friday 17 February 2006 17:47, Sam Ravnborg wrote:
> > Several warnings are refereces to module parameters - sound/oss/mad16.o
> > as the most visible one. I have not yet figured out if this is a false
> > positive or not. Removing __initdata on the moduleparam variable solves
> > it, but then this may be the wrong approach.
> >
>
> It looks like your check does not like when data associated with a module
> parameter is marked __initdata. But I think it is allowed as long as
> module parameter access mode is 0 so we don't create sysfs entry for it.
It hits only arrays - so I took a look into moduleparam.h.
Looks like an __initdata tag is missing?
diff --git a/include/linux/moduleparam.h b/include/linux/moduleparam.h
index b5c98c4..e67eafd 100644
--- a/include/linux/moduleparam.h
+++ b/include/linux/moduleparam.h
@@ -147,6 +147,7 @@ extern int param_get_invbool(char *buffe
/* Comma-separated array: *nump is set to number they actually specified. */
#define module_param_array_named(name, array, type, nump, perm) \
static struct kparam_array __param_arr_##name \
+ __initdata \
= { ARRAY_SIZE(array), nump, param_set_##type, param_get_##type,\
sizeof(array[0]), array }; \
module_param_call(name, param_array_set, param_array_get, \
With this change static struct kparam_array __param_arr_##name is placed
in .init.data.
This made the warnings in drivers/input/joystick/db9 disappear.
And with db9 marked __initdata there should be nothing wrong in
using __initdata for __param_arr_##name as I see it.
Rusty - any comments on this?
Sam
-
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/