linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Arjan van de Ven <arjan@infradead.org>,
	linux-ide@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Subject: Re: [PATCH] pci: use pci_ioremap_bar() in drivers/ide
Date: Thu, 23 Oct 2008 00:42:09 +0400	[thread overview]
Message-ID: <48FF9021.6010205@ru.mvista.com> (raw)
In-Reply-To: <48FF8F3B.1090302@ru.mvista.com>

I just wrote:

>> diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
>> index 9ce1d80..b4be295 100644
>> --- a/drivers/ide/pci/scc_pata.c
>> +++ b/drivers/ide/pci/scc_pata.c

> [...]

>> @@ -557,10 +553,12 @@ static int setup_mmio_scc (struct pci_dev *dev, 
>> const char *name)
>>          return ret;
>>      }
>>  
>> -    if ((ctl_addr = ioremap(ctl_base, ctl_size)) == NULL)
>> +    ctl_addr = pci_ioremap_bar(dev, 0);
>> +    if (!ctl_addr)
>>          goto fail_0;
>>  
>> -    if ((dma_addr = ioremap(dma_base, dma_size)) == NULL)
>> +    dma_addr = pci_ioremap_bar(dev, 1);
>> +    if (!dma_addr)
>>          goto fail_1;
>>  
>>      pci_set_master(dev);

>    An added bonus here is fixing couple checkpatch.pl's warnings.

    Wait, those even were errors, so even better. :-)

MBR, Sergei

  reply	other threads:[~2008-10-22 20:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  4:48 [PATCH] pci: use pci_ioremap_bar() in drivers/ide Arjan van de Ven
2008-10-21 10:02 ` Sergei Shtylyov
2008-10-22 17:40   ` Sergei Shtylyov
2008-10-22 17:56     ` Arjan van de Ven
2008-10-22 18:08       ` Sergei Shtylyov
2008-10-22 20:23     ` Arjan van de Ven
2008-10-22 20:38       ` Sergei Shtylyov
2008-10-22 20:42         ` Sergei Shtylyov [this message]
2008-10-23 19:39         ` Bartlomiej Zolnierkiewicz
2008-10-23 19:35   ` Bartlomiej Zolnierkiewicz

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=48FF9021.6010205@ru.mvista.com \
    --to=sshtylyov@ru.mvista.com \
    --cc=arjan@infradead.org \
    --cc=bzolnier@gmail.com \
    --cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).