Re: [Patch] Shut up warnings from files under drivers/

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: WANG Cong <xiyou.wangcong@...>
Cc: Greg KH <gregkh@...>, LKML <linux-kernel@...>, Andrew Morton <akpm@...>
Date: Saturday, January 26, 2008 - 5:57 am

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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[Patch] Shut up warnings from files under drivers/, WANG Cong, (Sat Jan 26, 5:30 am)
Re: [Patch] Shut up warnings from files under drivers/, Sam Ravnborg, (Sat Jan 26, 5:57 am)
Re: [Patch] Shut up warnings from files under drivers/, Sam Ravnborg, (Sat Jan 26, 6:21 am)
Re: [Patch] Shut up warnings from files under drivers/, Jeff Garzik, (Sat Jan 26, 5:55 am)
Re: [Patch] Shut up warnings from files under drivers/, Sam Ravnborg, (Sat Jan 26, 3:17 pm)
[PATCH 2/2] Char: applicom, use pci_match_id, Jiri Slaby, (Wed Jan 30, 7:13 am)
Re: [PATCH 2/2] Char: applicom, use pci_match_id, Andrew Morton, (Wed Jan 30, 7:10 pm)
Re: [PATCH 2/2] Char: applicom, use pci_match_id, Jiri Slaby, (Thu Jan 31, 5:26 am)
[PATCH 1/2] Char: applicom, use pci_resource_start, Jiri Slaby, (Wed Jan 30, 7:13 am)
Re: [Patch] Shut up warnings from files under drivers/, Sam Ravnborg, (Sat Jan 26, 3:30 pm)
Re: [Patch] Shut up warnings from files under drivers/, Jeff Garzik, (Sat Jan 26, 7:44 am)