[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAErSpo4jazaN8YahJGs+KD1-j6o8QHe2LmiQwBY9+UweBVkHxQ@mail.gmail.com>
Date: Tue, 23 Jul 2013 12:12:42 -0600
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Jingoo Han <jg1.han@...sung.com>
Subject: Re: [PATCH 13/27] drivers/pci/host: don't check resource with devm_ioremap_resource
[+cc Jingoo]
On Tue, Jul 23, 2013 at 12:01 PM, Wolfram Sang <wsa@...-dreams.de> wrote:
> devm_ioremap_resource does sanity checks on the given resource. No need to
> duplicate this in the driver.
>
> Signed-off-by: Wolfram Sang <wsa@...-dreams.de>
Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
Jingoo, I can apply this, or if you have other pcie-designware.c
updates this cycle, you can fold it into those. Just let me know what
you'd prefer.
Bjorn
> drivers/pci/host/pcie-designware.c | 12 ------------
> 1 file changed, 12 deletions(-)
>
> diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
> index 26bdbda..f0ba6ef 100644
> --- a/drivers/pci/host/pcie-designware.c
> +++ b/drivers/pci/host/pcie-designware.c
> @@ -817,28 +817,16 @@ static int add_pcie_port(struct pcie_port *pp, struct platform_device *pdev)
> int ret;
>
> elbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!elbi_base) {
> - dev_err(&pdev->dev, "couldn't get elbi base resource\n");
> - return -EINVAL;
> - }
> pp->elbi_base = devm_ioremap_resource(&pdev->dev, elbi_base);
> if (IS_ERR(pp->elbi_base))
> return PTR_ERR(pp->elbi_base);
>
> phy_base = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - if (!phy_base) {
> - dev_err(&pdev->dev, "couldn't get phy base resource\n");
> - return -EINVAL;
> - }
> pp->phy_base = devm_ioremap_resource(&pdev->dev, phy_base);
> if (IS_ERR(pp->phy_base))
> return PTR_ERR(pp->phy_base);
>
> purple_base = platform_get_resource(pdev, IORESOURCE_MEM, 2);
> - if (!purple_base) {
> - dev_err(&pdev->dev, "couldn't get purple base resource\n");
> - return -EINVAL;
> - }
> pp->purple_base = devm_ioremap_resource(&pdev->dev, purple_base);
> if (IS_ERR(pp->purple_base))
> return PTR_ERR(pp->purple_base);
> --
> 1.7.10.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists