mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yisheng Xie <xieyisheng1@huawei.com>
To: Fabio Estevam <festevam@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	<ysxie@foxmail.com>, Bjorn Helgaas <bhelgaas@google.com>,
	<linux-pci@vger.kernel.org>
Subject: Re: [PATCH v3 08/27] PCI: replace devm_ioremap_nocache with devm_ioremap
Date: Mon, 25 Dec 2017 09:38:05 +0800	[thread overview]
Message-ID: <7b3aa58d-2da3-db85-d395-afdca6fd42e5@huawei.com> (raw)
In-Reply-To: <CAOMZO5AyC5wMgowLfwdA7fc8UNV9YORjdS09aUhekk01KYge0g@mail.gmail.com>

Hi Fabio,

Thanks for you reviewing and comment!

On 2017/12/23 20:23, Fabio Estevam wrote:
> On Sat, Dec 23, 2017 at 8:58 AM, Yisheng Xie <xieyisheng1@huawei.com> wrote:
>> Default ioremap is ioremap_nocache, so devm_ioremap has the same
>> function with devm_ioremap_nocache, which can just be killed to
>> save the size of devres.o
>>
>> This patch is to use use devm_ioremap instead of devm_ioremap_nocache,
>> which should not have any function change but prepare for killing
>> devm_ioremap_nocache.
>>
>> Cc: Bjorn Helgaas <bhelgaas@google.com>
>> Cc: linux-pci@vger.kernel.org
>> Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
>> ---
>>  drivers/pci/dwc/pci-dra7xx.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/pci/dwc/pci-dra7xx.c b/drivers/pci/dwc/pci-dra7xx.c
>> index e77a4cee..3f3712a 100644
>> --- a/drivers/pci/dwc/pci-dra7xx.c
>> +++ b/drivers/pci/dwc/pci-dra7xx.c
>> @@ -637,7 +637,7 @@ static int __init dra7xx_pcie_probe(struct platform_device *pdev)
>>         }
>>
>>         res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ti_conf");
>> -       base = devm_ioremap_nocache(dev, res->start, resource_size(res));
>> +       base = devm_ioremap(dev, res->start, resource_size(res));
> 
> You could also consider using devm_ioremap_resource(), which checks
> whether the resource is NULL and it is a bit shorter:
> 
> base = devm_ioremap_resource(dev, res);
> if (IS_ERR(base))
>    return PTR_ERR(base);

Yeah, I will check if all the archs have the same ioremap and ioremap_noache, first.
If it is so, I will take your suggestion.

Thanks
Yisheng

> 
> 
>>
>> --
>> 1.8.3.1
>>
> 
> .
> 

      reply	other threads:[~2017-12-25  1:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-23 10:58 Yisheng Xie
2017-12-23 12:23 ` Fabio Estevam
2017-12-25  1:38   ` Yisheng Xie [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=7b3aa58d-2da3-db85-d395-afdca6fd42e5@huawei.com \
    --to=xieyisheng1@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=festevam@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ysxie@foxmail.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

all inboxes | Powered by JetHome®