From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751790AbbKQKhS (ORCPT ); Tue, 17 Nov 2015 05:37:18 -0500 Received: from terminus.zytor.com ([198.137.202.10]:38429 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750913AbbKQKhP (ORCPT ); Tue, 17 Nov 2015 05:37:15 -0500 Date: Tue, 17 Nov 2015 02:36:45 -0800 From: tip-bot for Arnd Bergmann Message-ID: Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@kernel.org, kernel@pengutronix.de, stefan@agner.ch, arnd@arndb.de, hpa@zytor.com, daniel.lezcano@linaro.org, shawnguo@kernel.org, Li.Xiubo@freescale.com Reply-To: kernel@pengutronix.de, mingo@kernel.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, Li.Xiubo@freescale.com, shawnguo@kernel.org, daniel.lezcano@linaro.org, hpa@zytor.com, arnd@arndb.de, stefan@agner.ch In-Reply-To: <3990834.xnjhm37Grs@wuerfel> References: <3990834.xnjhm37Grs@wuerfel> To: linux-tip-commits@vger.kernel.org Subject: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings Git-Commit-ID: dde7632ed02382e4bac2b57c66ee2285764f2cd7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: dde7632ed02382e4bac2b57c66ee2285764f2cd7 Gitweb: http://git.kernel.org/tip/dde7632ed02382e4bac2b57c66ee2285764f2cd7 Author: Arnd Bergmann AuthorDate: Mon, 16 Nov 2015 17:34:50 +0100 Committer: Thomas Gleixner 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 Cc: linux-arm-kernel@lists.infradead.org Cc: Xiubo Li Cc: Shawn Guo Cc: Sascha Hauer Cc: Stefan Agner Cc: Daniel Lezcano Link: http://lkml.kernel.org/r/3990834.xnjhm37Grs@wuerfel Signed-off-by: Thomas Gleixner --- 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);