public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
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:42:19 +0200	[thread overview]
Message-ID: <4EA1306B.5070001@suse.cz> (raw)
In-Reply-To: <4EA12E1D.4010504@suse.cz>

On 21.10.2011 10:32, Michal Marek wrote:
> 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).
  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Correction: it's actually a probe function with __devinit, which on most
setups (with CONFIG_HOTPLUG=y) can be called any time, but then on those
setups the __devinit does not cause the section to be freed.
Nevertheless, naming the variable puv3_rtc_driver is the correct solution.

Michal

      reply	other threads:[~2011-10-21  8:42 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
2011-10-21  8:42     ` Michal Marek [this message]

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=4EA1306B.5070001@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