Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings

From: Daniel Lezcano
Date: Tue Nov 17 2015 - 06:25:34 EST

On 11/17/2015 11:36 AM, tip-bot for Arnd Bergmann wrote:
Commit-ID: dde7632ed02382e4bac2b57c66ee2285764f2cd7
Author: Arnd Bergmann <arnd@xxxxxxxx>
AuthorDate: Mon, 16 Nov 2015 17:34:50 +0100
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
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@xxxxxxxx>
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: Xiubo Li <Li.Xiubo@xxxxxxxxxxxxx>
Cc: Shawn Guo <shawnguo@xxxxxxxxxx>
Cc: Sascha Hauer <kernel@xxxxxxxxxxxxxx>
Cc: Stefan Agner <stefan@xxxxxxxx>
Cc: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
Link: 3990834.xnjhm37Grs@wuerfel">
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>


Ok, I dropped the patch from my tree.

-- Daniel

<> â Open source software for ARM SoCs

Follow Linaro: <> Facebook |
<!/linaroorg> Twitter |
<> Blog

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at