lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 23 Dec 2017 10:23:34 -0200
From:   Fabio Estevam <festevam@...il.com>
To:     Yisheng Xie <xieyisheng1@...wei.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        ysxie@...mail.com, Bjorn Helgaas <bhelgaas@...gle.com>,
        linux-pci@...r.kernel.org
Subject: Re: [PATCH v3 08/27] PCI: replace devm_ioremap_nocache with devm_ioremap

On Sat, Dec 23, 2017 at 8:58 AM, Yisheng Xie <xieyisheng1@...wei.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@...gle.com>
> Cc: linux-pci@...r.kernel.org
> Signed-off-by: Yisheng Xie <xieyisheng1@...wei.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);


>
> --
> 1.8.3.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ