[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-dde7632ed02382e4bac2b57c66ee2285764f2cd7@git.kernel.org>
Date: Tue, 17 Nov 2015 02:36:45 -0800
From: tip-bot for Arnd Bergmann <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...nel.org,
kernel@...gutronix.de, stefan@...er.ch, arnd@...db.de,
hpa@...or.com, daniel.lezcano@...aro.org, shawnguo@...nel.org,
Li.Xiubo@...escale.com
Subject: [tip:timers/urgent] clocksource/fsl:
Avoid harmless 64-bit warnings
Commit-ID: dde7632ed02382e4bac2b57c66ee2285764f2cd7
Gitweb: http://git.kernel.org/tip/dde7632ed02382e4bac2b57c66ee2285764f2cd7
Author: Arnd Bergmann <arnd@...db.de>
AuthorDate: Mon, 16 Nov 2015 17:34:50 +0100
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitDate: Mon, 16 Nov 2015 19:07:08 +0100
clocksource/fsl: Avoid harmless 64-bit warnings
The ftm_clockevent_init passes the value of "~0UL" into a function
that takes a 32-bit argument, which drops the upper 32 bits, as
gcc warns about on ARM64:
clocksource/fsl_ftm_timer.c: In function 'ftm_clockevent_init':
clocksource/fsl_ftm_timer.c:206:13: warning: large integer implicitly truncated to unsigned type [-Woverflow]
This was obviously unintended behavior, and is easily avoided by
using '~0u' as the integer literal, because that is 32-bit wide
on all architectures.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: Xiubo Li <Li.Xiubo@...escale.com>
Cc: Shawn Guo <shawnguo@...nel.org>
Cc: Sascha Hauer <kernel@...gutronix.de>
Cc: Stefan Agner <stefan@...er.ch>
Cc: Daniel Lezcano <daniel.lezcano@...aro.org>
Link: http://lkml.kernel.org/r/3990834.xnjhm37Grs@wuerfel
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
drivers/clocksource/fsl_ftm_timer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clocksource/fsl_ftm_timer.c b/drivers/clocksource/fsl_ftm_timer.c
index 10202f1..517e1c7 100644
--- a/drivers/clocksource/fsl_ftm_timer.c
+++ b/drivers/clocksource/fsl_ftm_timer.c
@@ -203,7 +203,7 @@ static int __init ftm_clockevent_init(unsigned long freq, int irq)
int err;
ftm_writel(0x00, priv->clkevt_base + FTM_CNTIN);
- ftm_writel(~0UL, priv->clkevt_base + FTM_MOD);
+ ftm_writel(~0u, priv->clkevt_base + FTM_MOD);
ftm_reset_counter(priv->clkevt_base);
@@ -230,7 +230,7 @@ static int __init ftm_clocksource_init(unsigned long freq)
int err;
ftm_writel(0x00, priv->clksrc_base + FTM_CNTIN);
- ftm_writel(~0UL, priv->clksrc_base + FTM_MOD);
+ ftm_writel(~0u, priv->clksrc_base + FTM_MOD);
ftm_reset_counter(priv->clksrc_base);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists