From: Kishon Vijay Abraham I <kishon@ti.com>
To: Markus Elfring <Markus.Elfring@web.de>,
<kernel-janitors@vger.kernel.org>,
Igal Liberman <igall@marvell.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy-mvebu-a3700-utmi: Use devm_platform_ioremap_resource() in mvebu_a3700_utmi_phy_probe()
Date: Wed, 23 Oct 2019 10:55:12 +0530 [thread overview]
Message-ID: <5e5cfafa-ade8-6f26-9989-d949c6d5c388@ti.com> (raw)
In-Reply-To: <5403540b-d3de-4a29-ec84-7ce5bb8d6d9f@web.de>
On 26/09/19 9:50 PM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Thu, 26 Sep 2019 18:15:23 +0200
>
> Simplify this function implementation by using a known wrapper function.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
merged, thanks!
-Kishon
> ---
> drivers/phy/marvell/phy-mvebu-a3700-utmi.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/phy/marvell/phy-mvebu-a3700-utmi.c b/drivers/phy/marvell/phy-mvebu-a3700-utmi.c
> index ded900b06f5a..23bc3bf5c4c0 100644
> --- a/drivers/phy/marvell/phy-mvebu-a3700-utmi.c
> +++ b/drivers/phy/marvell/phy-mvebu-a3700-utmi.c
> @@ -216,20 +216,13 @@ static int mvebu_a3700_utmi_phy_probe(struct platform_device *pdev)
> struct device *dev = &pdev->dev;
> struct mvebu_a3700_utmi *utmi;
> struct phy_provider *provider;
> - struct resource *res;
>
> utmi = devm_kzalloc(dev, sizeof(*utmi), GFP_KERNEL);
> if (!utmi)
> return -ENOMEM;
>
> /* Get UTMI memory region */
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(dev, "Missing UTMI PHY memory resource\n");
> - return -ENODEV;
> - }
> -
> - utmi->regs = devm_ioremap_resource(dev, res);
> + utmi->regs = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(utmi->regs))
> return PTR_ERR(utmi->regs);
>
> --
> 2.23.0
>
prev parent reply other threads:[~2019-10-23 5:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 16:20 Markus Elfring
2019-10-23 5:25 ` Kishon Vijay Abraham I [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=5e5cfafa-ade8-6f26-9989-d949c6d5c388@ti.com \
--to=kishon@ti.com \
--cc=Markus.Elfring@web.de \
--cc=igall@marvell.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.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®