mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Julia Lawall <julia.lawall@lip6.fr>
To: David Lechner <david@lechnology.com>
Cc: William Breathitt Gray <vilhelm.gray@gmail.com>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	kbuild-all@01.org
Subject: [PATCH] counter: fix devm_platform_ioremap_resource.cocci warnings
Date: Fri, 9 Aug 2019 11:41:19 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.21.1908091139270.2946@hadrien> (raw)

From: kbuild test robot <lkp@intel.com>

 Use devm_platform_ioremap_resource helper which wraps
 platform_get_resource() and devm_ioremap_resource() together.

Generated by: scripts/coccinelle/api/devm_platform_ioremap_resource.cocci

Fixes: 78958c294246 ("counter: new TI eQEP driver")
Signed-off-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---

tree:   https://github.com/dlech/linux bone-counter
head:   669cef0feba0b11f271f462c4d26e4d1449a9db8
commit: 78958c294246fe1177ff62518eef45d20ad0165e [5/8] counter: new TI eQEP driver
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago

Despite the fixes tag, this is not actually fixing a bug, it just makes
the code a little shorter.

 ti-eqep.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/drivers/counter/ti-eqep.c
+++ b/drivers/counter/ti-eqep.c
@@ -392,15 +392,13 @@ static int ti_eqep_probe(struct platform
 {
 	struct device *dev = &pdev->dev;
 	struct ti_eqep_cnt *priv;
-	struct resource *res;
 	void __iomem *base;

 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
 	if (!priv)
 		return -ENOMEM;

-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(dev, res);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base))
 		return PTR_ERR(base);


             reply	other threads:[~2019-08-09  9:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09  9:41 Julia Lawall [this message]
2019-09-01 23:00 ` David Lechner

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=alpine.DEB.2.21.1908091139270.2946@hadrien \
    --to=julia.lawall@lip6.fr \
    --cc=david@lechnology.com \
    --cc=kbuild-all@01.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vilhelm.gray@gmail.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®