From: Andres Salomon <dilinger@queued.net>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: sameo@linux.intel.com, akpm@linux-foundation.org, tj@kernel.org,
joe@perches.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc/cs5535: Fix section mismatch derived from cs5535_mfgpt_drv variable
Date: Mon, 3 Jan 2011 01:52:31 -0800 [thread overview]
Message-ID: <20110103015231.1a0e6997@queued.net> (raw)
In-Reply-To: <1294023088-31687-1-git-send-email-sedat.dilek@gmail.com>
On Mon, 3 Jan 2011 03:51:28 +0100
Sedat Dilek <sedat.dilek@googlemail.com> wrote:
> From my build.log:
>
> WARNING: drivers/misc/cs5535-mfgpt.o(.data+0x0): Section mismatch in
> reference from the variable cs5535_mfgpt_drv to the
> function .devinit.text:cs5535_mfgpt_probe() The variable
> cs5535_mfgpt_drv references the function __devinit
> cs5535_mfgpt_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,
>
> This patch fixes the warning.
>
> Tested with linux-next (next-20101231)
>
> Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
> ---
> drivers/misc/cs5535-mfgpt.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/misc/cs5535-mfgpt.c b/drivers/misc/cs5535-mfgpt.c
> index d02d302..d80bd14 100644
> --- a/drivers/misc/cs5535-mfgpt.c
> +++ b/drivers/misc/cs5535-mfgpt.c
> @@ -329,7 +329,7 @@ done:
> return err;
> }
>
> -static struct platform_driver cs5535_mfgpt_drv = {
> +static struct platform_driver cs5535_mfgpt_drv __refdata = {
> .driver = {
> .name = DRV_NAME,
> .owner = THIS_MODULE,
Hm, I'm confused. There are plenty of other drivers in mfd/ and gpio/
that have their probe/remove functions marked as __dev{init,exit}, with
their associated platform_driver definitions not marked with any kind
of init marking. Are they all generating this warning and getting
the same __refdata treatment?
next prev parent reply other threads:[~2011-01-03 9:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-03 2:51 Sedat Dilek
2011-01-03 9:52 ` Andres Salomon [this message]
2011-01-03 10:04 ` Sedat Dilek
2011-01-03 19:43 ` Andrew Morton
2011-01-03 19:51 ` Sam Ravnborg
2011-01-03 20:34 ` Andres Salomon
2011-01-03 20:50 ` Sam Ravnborg
2011-01-03 21:14 ` Andres Salomon
2011-01-04 5:59 ` Sam Ravnborg
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=20110103015231.1a0e6997@queued.net \
--to=dilinger@queued.net \
--cc=akpm@linux-foundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=sedat.dilek@gmail.com \
--cc=tj@kernel.org \
/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
all inboxes | Powered by JetHome®