From: Michal Marek <mmarek@suse.cz>
To: gxt@mprc.pku.edu.cn
Cc: Axel Lin <axel.lin@gmail.com>, Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org,
Alessandro Zummo <a.zummo@towertech.it>,
rtc-linux@googlegroups.com
Subject: Re: [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove
Date: Fri, 21 Oct 2011 10:32:29 +0200 [thread overview]
Message-ID: <4EA12E1D.4010504@suse.cz> (raw)
In-Reply-To: <1318922541.1789.36.camel@epip-laptop>
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
next prev parent reply other threads:[~2011-10-21 8:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-05 14:29 [PATCH] rtc: rtc-puv3: Add __devinit and __devexit markers for probe and remove Axel Lin
2011-10-11 10:25 ` Guan Xuetao
2011-10-12 2:58 ` Guan Xuetao
2011-10-18 7:22 ` Guan Xuetao
2011-10-18 8:44 ` Axel Lin
2011-10-18 10:35 ` Guan Xuetao
2011-10-21 8:32 ` Michal Marek [this message]
2011-10-21 8:42 ` Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EA12E1D.4010504@suse.cz \
--to=mmarek@suse.cz \
--cc=a.zummo@towertech.it \
--cc=arnd@arndb.de \
--cc=axel.lin@gmail.com \
--cc=gxt@mprc.pku.edu.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox