[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4EA12E1D.4010504@suse.cz>
Date: Fri, 21 Oct 2011 10:32:29 +0200
From: Michal Marek <mmarek@...e.cz>
To: gxt@...c.pku.edu.cn
Cc: Axel Lin <axel.lin@...il.com>, Arnd Bergmann <arnd@...db.de>,
linux-kernel@...r.kernel.org,
Alessandro Zummo <a.zummo@...ertech.it>,
rtc-linux@...glegroups.com
Subject: Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for
probe and remove
On 18.10.2011 09:22, Guan Xuetao wrote:
> Hi Axel,
> The patch yield following warnings:
>
> WARNING: drivers/rtc/built-in.o(.data+0x90): Section mismatch in
> reference from the variable puv3_rtcdrv to the
> function .devinit.text:puv3_rtc_probe()
> The variable puv3_rtcdrv references
> the function __devinit puv3_rtc_probe()
> If the reference is valid then annotate the
> variable with __init* or __refdata (see linux/init.h) or name the
> variable:
> *driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
> *_console
[...]
>
> For puv3_rtc_probe, I think it should be in the white-list, but warnings
> are yielded.
> For puv3_rtc_remove, the warning could be disappeared by modifying
> __devexit to __exit, however is it proper?
The warning message tries to hint at the solution. Just name the variable
static struct platform_driver puv3_rtc_driver
and modpost will know that this is simply a list of pointers to driver
functions, in which case the section mismatch is OK (the init function
will only be called at init time).
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists