From: Jingoo Han <jg1.han@samsung.com>
To: 'Jason Cooper' <jason@lakedaemon.net>
Cc: 'Bjorn Helgaas' <bhelgaas@google.com>,
linux-pci@vger.kernel.org,
'Thomas Petazzoni' <thomas.petazzoni@free-electrons.com>,
'Jason Cooper' <jason@lakedaemon.net>,
'Andrew Lunn' <andrew@lunn.ch>,
'Gregory Clement' <gregory.clement@free-electrons.com>,
'Jingoo Han' <jg1.han@samsung.com>
Subject: Re: [PATCH V3 3/3] PCI: mvebu: return NULL instead of ERR_PTR(ret)
Date: Tue, 15 Oct 2013 18:12:07 +0900 [thread overview]
Message-ID: <000001cec986$9f8ef570$deace050$%han@samsung.com> (raw)
In-Reply-To: <000101ceb826$8695b7f0$93c127d0$%han@samsung.com>
On Monday, September 23, 2013 3:31 PM, Jingoo Han wrote:
>
> Return NULL instead of ERR_PTR(ret) in order to fix the following
> sparse warning:
>
> drivers/pci/host/pci-mvebu.c:744:31: warning: incorrect type in return expression (different address
> spaces)
> drivers/pci/host/pci-mvebu.c:744:31: expected void [noderef] <asn:2>*
> drivers/pci/host/pci-mvebu.c:744:31: got void *
>
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
(+cc Andrew Lunn, Gregory Clement)
Hi Jason Cooper,
Would you apply this patch into your 'linux-mvebu.git' tree?
It was already Acked by Thomas Petazzoni.
Also, it is a trivial change to fix sparse warning.
Thank you.
Best regards,
Jingoo Han
> ---
> drivers/pci/host/pci-mvebu.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
> index 0bd3ba8..fb2474f 100644
> --- a/drivers/pci/host/pci-mvebu.c
> +++ b/drivers/pci/host/pci-mvebu.c
> @@ -741,7 +741,7 @@ static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
>
> ret = of_address_to_resource(np, 0, ®s);
> if (ret)
> - return ERR_PTR(ret);
> + return NULL;
>
> return devm_ioremap_resource(&pdev->dev, ®s);
> }
> @@ -940,10 +940,9 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
> continue;
>
> port->base = mvebu_pcie_map_registers(pdev, child, port);
> - if (IS_ERR(port->base)) {
> + if (!port->base) {
> dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n",
> port->port, port->lane);
> - port->base = NULL;
> clk_disable_unprepare(port->clk);
> continue;
> }
> --
> 1.7.10.4
next prev parent reply other threads:[~2013-10-15 9:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-23 4:33 [PATCH V3 1/3] PCI: tegra: add missing __iomem annotation Jingoo Han
2013-09-23 4:35 ` [PATCH V3 2/3] PCI: mvebu: make local functions static Jingoo Han
2013-09-23 6:31 ` [PATCH V3 3/3] PCI: mvebu: return NULL instead of ERR_PTR(ret) Jingoo Han
2013-10-15 9:12 ` Jingoo Han [this message]
2013-10-17 13:04 ` Jason Cooper
2013-09-27 19:29 ` [PATCH V3 1/3] PCI: tegra: add missing __iomem annotation Bjorn Helgaas
-- strict thread matches above, loose matches on Subject: below --
2013-09-17 5:25 [PATCH V2 " Jingoo Han
2013-09-23 4:35 ` [PATCH V3 3/3] PCI: mvebu: return NULL instead of ERR_PTR(ret) Jingoo Han
2013-09-23 7:24 ` Thomas Petazzoni
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='000001cec986$9f8ef570$deace050$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=andrew@lunn.ch \
--cc=bhelgaas@google.com \
--cc=gregory.clement@free-electrons.com \
--cc=jason@lakedaemon.net \
--cc=linux-pci@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.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;
as well as URLs for NNTP newsgroup(s).