From: paul@pwsan.com (Paul Walmsley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ARM: OMAP2+: fix 'using plain integer as NULL pointer' sparse warnings
Date: Mon, 12 Mar 2012 16:42:57 -0600 [thread overview]
Message-ID: <20120312224255.4103.6182.stgit@dusk> (raw)
In-Reply-To: <20120312224006.4103.29464.stgit@dusk>
sparse warns when 0 is passed to a function expecting a pointer argument.
Resolve these warnings by replacing the 0 with NULL.
arch/arm/plat-omap/include/plat/dmtimer.h:319:34: warning: Using plain integer as NULL pointer
arch/arm/plat-omap/include/plat/dmtimer.h:324:35: warning: Using plain integer as NULL pointer
arch/arm/mach-omap2/irq.c:294:22: warning: Using plain integer as NULL pointer
Signed-off-by: Paul Walmsley <paul@pwsan.com>
---
arch/arm/mach-omap2/irq.c | 2 +-
arch/arm/plat-omap/include/plat/dmtimer.h | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index 8247c51..22d9f6b 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -292,7 +292,7 @@ void omap_intc_restore_context(void)
void omap3_intc_suspend(void)
{
/* A pending interrupt would prevent OMAP from entering suspend */
- omap_ack_irq(0);
+ omap_ack_irq(NULL);
}
void omap3_intc_prepare_idle(void)
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 9418f00..230ff91 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -316,12 +316,12 @@ static inline void __omap_dm_timer_init_regs(struct omap_dm_timer *timer)
OMAP_TIMER_V1_SYS_STAT_OFFSET;
timer->irq_stat = timer->io_base + OMAP_TIMER_V1_STAT_OFFSET;
timer->irq_ena = timer->io_base + OMAP_TIMER_V1_INT_EN_OFFSET;
- timer->irq_dis = 0;
+ timer->irq_dis = NULL;
timer->pend = timer->io_base + _OMAP_TIMER_WRITE_PEND_OFFSET;
timer->func_base = timer->io_base;
} else {
timer->revision = 2;
- timer->sys_stat = 0;
+ timer->sys_stat = NULL;
timer->irq_stat = timer->io_base + OMAP_TIMER_V2_IRQSTATUS;
timer->irq_ena = timer->io_base + OMAP_TIMER_V2_IRQENABLE_SET;
timer->irq_dis = timer->io_base + OMAP_TIMER_V2_IRQENABLE_CLR;
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 ` [PATCH 3/5] ARM: OMAP2+: GPMC: resolve type-conversion warning from sparse Paul Walmsley
2012-03-12 22:42 ` Paul Walmsley [this message]
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=20120312224255.4103.6182.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).