From: Kevin Hilman <khilman@deeprootsystems.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org,
davinci-linux-open-source@linux.davincidsp.com
Subject: Re: [PATCH] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS()
Date: Fri, 30 Jan 2009 10:23:00 -0800 [thread overview]
Message-ID: <8763jwk60r.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4982E7DE.2080800@ru.mvista.com> (Sergei Shtylyov's message of "Fri\, 30 Jan 2009 14\:43\:26 +0300")
Sergei Shtylyov <sshtylyov@ru.mvista.com> writes:
> Hello.
>
> Kevin Hilman wrote:
>
>>> Hello.
>>>
>>> Kevin Hilman wrote:
>>>
>>>
>>>> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
>>>>
>>> Sorry, NAK.
>>>
>>>
>>>> diff --git a/drivers/ide/palm_bk3710.c b/drivers/ide/palm_bk3710.c
>>>> index f38aac7..be9c904 100644
>>>> --- a/drivers/ide/palm_bk3710.c
>>>> +++ b/drivers/ide/palm_bk3710.c
>>>> @@ -380,7 +380,11 @@ static int __init palm_bk3710_probe(struct platform_device *pdev)
>>>> return -EBUSY;
>>>> }
>>>> - base = IO_ADDRESS(mem->start);
>>>> + base = ioremap(mem->start, mem->end);
>>>> + if (!base) {
>>>> + printk(KERN_ERR "failed to map IO memory\n");
>>>> + return -ENOMEM;
>>>>
>>> Leaks requested memory region.
>> Where would you suggest putting the iounmap?
>
> You misunderstood -- you don't call release_mem_region() on the
> error path.
Ah, I see. Good catch. I also noticed ioremap() takes 'size' and not
'end' so that needs to be fixed too. Will resend.
Kevin
>> Which brings up a bigger question, why isn't there a remove hook. I
>> vaguely remember there being some problem way back in the 2.6.18 time
>> frame that wouldn't allow this driver to be removed.
>
> The IDE drivers were generally undremovable back then.
>
>> Is that still a problem in newer kernels?
>>
>
> No, shouldn't be -- they've been made removable since.
>
>> Kevin
>
> MBR, Sergei
prev parent reply other threads:[~2009-01-30 18:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-29 23:05 [PATCH] IDE: palm_bk3710: use ioremap instead of arch-specific IO_ADDRESS() Kevin Hilman
2009-01-29 23:51 ` Sergei Shtylyov
2009-01-30 0:29 ` Kevin Hilman
2009-01-30 11:43 ` Sergei Shtylyov
2009-01-30 18:23 ` Kevin Hilman [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=8763jwk60r.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=linux-ide@vger.kernel.org \
--cc=sshtylyov@ru.mvista.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;
as well as URLs for NNTP newsgroup(s).