driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: hariprasad@osuosl.org, Kelam@osuosl.org, hariprasad.kelam@gmail.com
Cc: devel@driverdev.osuosl.org,
	Saiyam Doshi <saiyamdoshi.in@gmail.com>,
	Hariprasad Kelam <hariprasad.kelam@gmail.com>,
	Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>,
	Nishad Kamdar <nishadkamdar@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org,
	Daniela Mormocea <daniela.mormocea@gmail.com>,
	Cristian Sicilia <sicilia.cristian@gmail.com>,
	Nathan Chancellor <natechancellor@gmail.com>
Subject: [PATCH] staging: emxx_udc: make use of devm_platform_ioremap_resource
Date: Tue,  8 Oct 2019 12:14:27 +0530	[thread overview]
Message-ID: <1570517072-29201-1-git-send-email-hariprasad.kelam@gmail.com> (raw)

From: Hariprasad Kelam <hariprasad.kelam@gmail.com>

fix below issue reported by coccicheck
drivers/staging//emxx_udc/emxx_udc.c:3092:1-10: WARNING: Use
devm_platform_ioremap_resource for mmio_base

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 147481b..9e0c19e 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -3078,7 +3078,6 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 {
 	int	status = -ENODEV;
 	struct nbu2ss_udc	*udc;
-	struct resource *r;
 	int irq;
 	void __iomem *mmio_base;
 
@@ -3088,8 +3087,7 @@ static int nbu2ss_drv_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, udc);
 
 	/* require I/O memory and IRQ to be provided as resources */
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	mmio_base = devm_ioremap_resource(&pdev->dev, r);
+	mmio_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(mmio_base))
 		return PTR_ERR(mmio_base);
 
-- 
2.7.4

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

                 reply	other threads:[~2019-10-08  6:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1570517072-29201-1-git-send-email-hariprasad.kelam@gmail.com \
    --to=hariprasad@osuosl.org \
    --cc=Kelam@osuosl.org \
    --cc=daniela.mormocea@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hariprasad.kelam@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=nishadkamdar@gmail.com \
    --cc=payal.s.kshirsagar.98@gmail.com \
    --cc=saiyamdoshi.in@gmail.com \
    --cc=sicilia.cristian@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;
as well as URLs for NNTP newsgroup(s).