[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTimpfSxxyDYQ5SzJ9XtOOhNxGBtY48dLpnjMGMq5@mail.gmail.com>
Date: Mon, 3 Jan 2011 11:04:48 +0100
From: Sedat Dilek <sedat.dilek@...glemail.com>
To: Andres Salomon <dilinger@...ued.net>
Cc: sameo@...ux.intel.com, akpm@...ux-foundation.org, tj@...nel.org,
joe@...ches.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] misc/cs5535: Fix section mismatch derived from
cs5535_mfgpt_drv variable
On Mon, Jan 3, 2011 at 10:52 AM, Andres Salomon <dilinger@...ued.net> wrote:
> On Mon, 3 Jan 2011 03:51:28 +0100
> Sedat Dilek <sedat.dilek@...glemail.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@...il.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?
>
Yes, there is also a section mismatch in "drivers/misc/ioc4.c" (see P.S.).
I hadn't time to look at it as it was very late 3 or 4 a.m. (and first
time sending patches via git-send-email :-)).
There are still some more section mismatches in other sub-trees, for
example "drivers/mtd/devices/sst25l.c" which I haven't catched.
If someone can look at it?
- Sedat -
P.S.: From my build_linux-next_next20101231.dileks.4.log:
WARNING: drivers/misc/ioc4.o(.data+0xc): Section mismatch in reference
from the variable ioc4_load_modules_work to the function
.devinit.text:ioc4_load_modules()
The variable ioc4_load_modules_work references
the function __devinit ioc4_load_modules()
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,
- EOT -
View attachment "all-section-mismatches.txt" of type "text/plain" (4592 bytes)
Powered by blists - more mailing lists