mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: hartleys@visionengravers.com
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: drivers/ide/au1xxx-ide.c: use resource_size()
Date: Mon, 23 Nov 2009 10:28:17 -0800 (PST)	[thread overview]
Message-ID: <20091123.102817.157628485.davem@davemloft.net> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901EE5BFD@mi8nycmail19.Mi8.com>

From: "H Hartley Sweeten" <hartleys@visionengravers.com>
Date: Mon, 23 Nov 2009 13:15:32 -0500

> Use resource_size() for {request/release}_mem_region and ioremap.
> 
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>

Applied to ide-next-2.6, thanks.

>  
> -	ahwif->regbase = (u32)ioremap(res->start, res->end - res->start + 1);
> +	ahwif->regbase = (u32)ioremap(res->start, resource_size(res));
>  	if (ahwif->regbase == 0) {
>  		ret = -ENOMEM;
>  		goto out;

That needs some fixing.  ioremap()'s return value is an
"__iomem" pointer, not an integer.  ->regbase's type should be
changed to something like "void __iomem *" etc.

  reply	other threads:[~2009-11-23 18:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-23 18:15 H Hartley Sweeten
2009-11-23 18:28 ` David Miller [this message]
2009-11-23 18:37   ` H Hartley Sweeten
2009-11-23 18:38     ` David Miller
2009-11-23 20:01       ` H Hartley Sweeten
2009-11-23 20:20         ` David Miller

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=20091123.102817.157628485.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=hartleys@visionengravers.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.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®