From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] ARM: OMAP2+: GPMC: resolve type-conversion warning from sparse
Date: Mon, 12 Mar 2012 16:42:55 -0600 [thread overview]
Message-ID: <20120312224253.4103.35418.stgit@dusk> (raw)
In-Reply-To: <20120312224006.4103.29464.stgit@dusk>
arch/arm/mach-omap2/gpmc.c passes a return value from ioremap() as the
fifth argument to request_irq() without casting it. This causes
sparse to generate the following warning:
arch/arm/mach-omap2/gpmc.c:759:63: warning: incorrect type in argument 5 (different address spaces)
arch/arm/mach-omap2/gpmc.c:759:63: expected void *dev
arch/arm/mach-omap2/gpmc.c:759:63: got void [noderef] <asn:2>*static [toplevel] [assigned] gpmc_base
It turns out that it's not necessary to pass this. gpmc_base is a
file-scoped static variable, the ISR is located in the same file ... and
the ISR doesn't even touch the passed-in variable. So, just replace it with
NULL in request_irq().
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/gpmc.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index dfffbbf..aae584c 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -755,8 +755,7 @@ static int __init gpmc_init(void)
irq++;
}
- ret = request_irq(gpmc_irq,
- gpmc_handle_irq, IRQF_SHARED, "gpmc", gpmc_base);
+ ret = request_irq(gpmc_irq, gpmc_handle_irq, IRQF_SHARED, "gpmc", NULL);
if (ret)
pr_err("gpmc: irq-%d could not claim: err %d\n",
gpmc_irq, ret);
next prev parent reply other threads:[~2012-03-12 22:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 22:42 [PATCH 0/5] ARM: OMAP2+: resolve some warnings from sparse, cppcheck Paul Walmsley
2012-03-12 22:42 ` [PATCH 1/5] ARM: OMAP2+: declare file-local functions as static Paul Walmsley
2012-03-13 7:12 ` Shilimkar, Santosh
2012-03-12 22:42 ` [PATCH 2/5] ARM: OMAP2+: add includes for missing prototypes Paul Walmsley
2012-03-13 6:53 ` Shilimkar, Santosh
2012-03-12 22:42 ` Paul Walmsley [this message]
2012-03-12 22:42 ` [PATCH 4/5] ARM: OMAP2+: fix 'using plain integer as NULL pointer' sparse warnings Paul Walmsley
2012-03-12 22:43 ` [PATCH 5/5] ARM: OMAP2+: clean up some cppcheck warnings Paul Walmsley
2012-03-13 7:10 ` Jarkko Nikula
2012-03-13 8:07 ` Paul Walmsley
2012-03-13 8:12 ` [PATCH v2 " Paul Walmsley
2012-03-13 8:21 ` Varadarajan, Charulatha
2012-03-13 8:44 ` [PATCH v3 " Paul Walmsley
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=20120312224253.4103.35418.stgit@dusk \
--to=paul@pwsan.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).