Hi WANG.
On Sat, Jan 26, 2008 at 05:30:07PM +0800, WANG Cong wrote:
Please include the actual warnings that you fix.
As replacement for the above I would prefer som kind of annotation
so we can drop the symbol at linker time.
Something like:
where we have:
#ifdef MODULE
#define __moduseddata __section(.module.data)
#define __modusedconst __section(.module.rodata)
#define __modused __section(.module.text)
#else
#define __moduseddata __section(.discard.data)
#define __modusedconst __section(.discard.rodata)
#define __modused __section(.discard.text)
#endif
And we can then discard the symbols as we do for
__initdata today.
Another much simpler solution could be to say:
But we would then in the built-in case waste some memory.
This function is properly annotated and __devexit_p() is used
so it should not generate a warning.
The root casue is that __devexit is defined to nothing in the
#ifdef CONFIG_HOTPLUG case - it should have been defined as
#define __devexit __used
if MODULE was not defined.
This is the better fix for these kind of warnings.
For the latter I have fixed this in kbuild.git.
So we are only left with the DEVICE_MOD_TABLE issue.
Sam
--