All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guan Xuetao <gxt@mprc.pku.edu.cn>
To: Axel Lin <axel.lin@gmail.com>, Michal Marek <mmarek@suse.cz>,
	Arnd Bergmann <arnd@arndb.de>
Cc: 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: Tue, 18 Oct 2011 15:22:21 +0800	[thread overview]
Message-ID: <1318922541.1789.36.camel@epip-laptop> (raw)
In-Reply-To: <1317824987.2674.1.camel@phoenix>

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

WARNING: drivers/rtc/built-in.o(.data+0x94): Section mismatch in
reference from the variable puv3_rtcdrv to the
function .devexit.text:puv3_rtc_remove()
The variable puv3_rtcdrv references
the function __devexit puv3_rtc_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
*_console

WARNING: drivers/built-in.o(.data+0x6c04): 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

WARNING: drivers/built-in.o(.data+0x6c08): Section mismatch in reference
from the variable puv3_rtcdrv to the
function .devexit.text:puv3_rtc_remove()
The variable puv3_rtcdrv references
the function __devexit puv3_rtc_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one,
*_console

WARNING: vmlinux.o(.data+0x1126c): 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

WARNING: vmlinux.o(.data+0x11270): Section mismatch in reference from
the variable puv3_rtcdrv to the function .devexit.text:puv3_rtc_remove()
The variable puv3_rtcdrv references
the function __devexit puv3_rtc_remove()
If the reference is valid then annotate the
variable with __exit* (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?

Also,
Cc: Michal Marek <mmarek@suse.cz>
Cc: Arnd Bergmann <arnd@arndb.de>

Any advice is appreciated, thanks.

Guan Xuetao


On Wed, 2011-10-05 at 22:29 +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
> ---
>  drivers/rtc/rtc-puv3.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c
> index b3eba3c..e4b6880 100644
> --- a/drivers/rtc/rtc-puv3.c
> +++ b/drivers/rtc/rtc-puv3.c
> @@ -220,7 +220,7 @@ static void puv3_rtc_enable(struct platform_device *pdev, int en)
>  	}
>  }
>  
> -static int puv3_rtc_remove(struct platform_device *dev)
> +static int __devexit puv3_rtc_remove(struct platform_device *dev)
>  {
>  	struct rtc_device *rtc = platform_get_drvdata(dev);
>  
> @@ -236,7 +236,7 @@ static int puv3_rtc_remove(struct platform_device *dev)
>  	return 0;
>  }
>  
> -static int puv3_rtc_probe(struct platform_device *pdev)
> +static int __devinit puv3_rtc_probe(struct platform_device *pdev)
>  {
>  	struct rtc_device *rtc;
>  	struct resource *res;



  parent reply	other threads:[~2011-10-18  7:23 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 [this message]
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

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=1318922541.1789.36.camel@epip-laptop \
    --to=gxt@mprc.pku.edu.cn \
    --cc=a.zummo@towertech.it \
    --cc=arnd@arndb.de \
    --cc=axel.lin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.