* [PATCH] watchdog: fix nv_tco section mismatch
@ 2011-03-24 20:32 Randy Dunlap
2011-03-25 23:42 ` Mike Waychison
0 siblings, 1 reply; 3+ messages in thread
From: Randy Dunlap @ 2011-03-24 20:32 UTC (permalink / raw)
To: lkml, Mike Waychison; +Cc: akpm, Wim Van Sebroeck, linux-watchdog
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix section mismatch warning:
Mark the called nv_tco_getdevice() as __devinit, just like its caller.
WARNING: drivers/watchdog/nv_tco.o(.devinit.text+0x16): Section mismatch in reference from the function nv_tco_init() to the function .init.text:nv_tco_getdevice()
The function __devinit nv_tco_init() references
a function __init nv_tco_getdevice().
If nv_tco_getdevice is only used by nv_tco_init then
annotate nv_tco_getdevice with a matching annotation.
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
drivers/watchdog/nv_tco.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- linux-2.6.38-git13.orig/drivers/watchdog/nv_tco.c
+++ linux-2.6.38-git13/drivers/watchdog/nv_tco.c
@@ -302,7 +302,7 @@ MODULE_DEVICE_TABLE(pci, tco_pci_tbl);
* Init & exit routines
*/
-static unsigned char __init nv_tco_getdevice(void)
+static unsigned char __devinit nv_tco_getdevice(void)
{
struct pci_dev *dev = NULL;
u32 val;
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] watchdog: fix nv_tco section mismatch
2011-03-24 20:32 [PATCH] watchdog: fix nv_tco section mismatch Randy Dunlap
@ 2011-03-25 23:42 ` Mike Waychison
2011-03-26 1:43 ` Randy Dunlap
0 siblings, 1 reply; 3+ messages in thread
From: Mike Waychison @ 2011-03-25 23:42 UTC (permalink / raw)
To: Randy Dunlap; +Cc: lkml, akpm, Wim Van Sebroeck, linux-watchdog
On Thu, Mar 24, 2011 at 1:32 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Fix section mismatch warning:
> Mark the called nv_tco_getdevice() as __devinit, just like its caller.
This looks fine.
I can't seem to reproduce the warning on my end however, compiling
this as a built-in nor as a module. How do I trigger a difference
between __init and __devinit?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] watchdog: fix nv_tco section mismatch
2011-03-25 23:42 ` Mike Waychison
@ 2011-03-26 1:43 ` Randy Dunlap
0 siblings, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2011-03-26 1:43 UTC (permalink / raw)
To: Mike Waychison; +Cc: lkml, akpm, Wim Van Sebroeck, linux-watchdog
On 03/25/11 16:42, Mike Waychison wrote:
> On Thu, Mar 24, 2011 at 1:32 PM, Randy Dunlap <randy.dunlap@oracle.com> wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> Fix section mismatch warning:
>> Mark the called nv_tco_getdevice() as __devinit, just like its caller.
>
> This looks fine.
>
> I can't seem to reproduce the warning on my end however, compiling
> this as a built-in nor as a module. How do I trigger a difference
> between __init and __devinit?
I just used allmodconfig. But why wouldn't you see a differnence between
__init and __devinit? They are defined differently in include/linux/init.h,
but maybe on some $arch, those sections are treated differently?
I dunno.
--
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-26 1:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-24 20:32 [PATCH] watchdog: fix nv_tco section mismatch Randy Dunlap
2011-03-25 23:42 ` Mike Waychison
2011-03-26 1:43 ` Randy Dunlap
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).