Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1270349 > unrolled thread
| Started by | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| First post | 2015-11-16 17:40 +0100 |
| Last post | 2015-11-17 12:50 +0100 |
| Articles | 7 — 4 participants |
Back to article view | Back to linux.kernel
[PATCH] clocksource: fsl: avoid harmless 64-bit warnings Arnd Bergmann <arnd@arndb.de> - 2015-11-16 17:40 +0100
Re: [PATCH] clocksource: fsl: avoid harmless 64-bit warnings Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-11-17 10:40 +0100
[tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings tip-bot for Arnd Bergmann <tipbot@zytor.com> - 2015-11-17 11:40 +0100
Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-11-17 12:30 +0100
Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings Thomas Gleixner <tglx@linutronix.de> - 2015-11-17 12:40 +0100
Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-11-17 12:50 +0100
Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings Daniel Lezcano <daniel.lezcano@linaro.org> - 2015-11-17 12:50 +0100
| From | Arnd Bergmann <arnd@arndb.de> |
|---|---|
| Date | 2015-11-16 17:40 +0100 |
| Subject | [PATCH] clocksource: fsl: avoid harmless 64-bit warnings |
| Message-ID | <qvuYX-1eV-31@gated-at.bofh.it> |
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@arndb.de> diff --git a/drivers/clocksource/fsl_ftm_timer.c b/drivers/clocksource/fsl_ftm_timer.c index 10202f1fdfd7..517e1c7624d4 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-11-17 10:40 +0100 |
| Message-ID | <qvKU1-3cW-17@gated-at.bofh.it> |
| In reply to | #1270349 |
On 11/16/2015 05:34 PM, Arnd Bergmann wrote: > 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@arndb.de> Thanks Arnd for the fix. I will apply it on top of branch. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Arnd Bergmann <tipbot@zytor.com> |
|---|---|
| Date | 2015-11-17 11:40 +0100 |
| Subject | [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings |
| Message-ID | <qvLQ6-3NL-7@gated-at.bofh.it> |
| In reply to | #1270349 |
Commit-ID: dde7632ed02382e4bac2b57c66ee2285764f2cd7 Gitweb: http://git.kernel.org/tip/dde7632ed02382e4bac2b57c66ee2285764f2cd7 Author: Arnd Bergmann <arnd@arndb.de> AuthorDate: Mon, 16 Nov 2015 17:34:50 +0100 Committer: Thomas Gleixner <tglx@linutronix.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@arndb.de> Cc: linux-arm-kernel@lists.infradead.org Cc: Xiubo Li <Li.Xiubo@freescale.com> Cc: Shawn Guo <shawnguo@kernel.org> Cc: Sascha Hauer <kernel@pengutronix.de> Cc: Stefan Agner <stefan@agner.ch> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Link: http://lkml.kernel.org/r/3990834.xnjhm37Grs@wuerfel Signed-off-by: Thomas Gleixner <tglx@linutronix.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-11-17 12:30 +0100 |
| Subject | Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings |
| Message-ID | <qvMCt-4n1-9@gated-at.bofh.it> |
| In reply to | #1271058 |
On 11/17/2015 11:36 AM, tip-bot for Arnd Bergmann wrote: > Commit-ID: dde7632ed02382e4bac2b57c66ee2285764f2cd7 > Gitweb: http://git.kernel.org/tip/dde7632ed02382e4bac2b57c66ee2285764f2cd7 > Author: Arnd Bergmann <arnd@arndb.de> > AuthorDate: Mon, 16 Nov 2015 17:34:50 +0100 > Committer: Thomas Gleixner <tglx@linutronix.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@arndb.de> > Cc: linux-arm-kernel@lists.infradead.org > Cc: Xiubo Li <Li.Xiubo@freescale.com> > Cc: Shawn Guo <shawnguo@kernel.org> > Cc: Sascha Hauer <kernel@pengutronix.de> > Cc: Stefan Agner <stefan@agner.ch> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org> > Link: http://lkml.kernel.org/r/3990834.xnjhm37Grs@wuerfel > Signed-off-by: Thomas Gleixner <tglx@linutronix.de> > > --- Ok, I dropped the patch from my tree. -- Daniel -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Date | 2015-11-17 12:40 +0100 |
| Subject | Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings |
| Message-ID | <qvMM9-4qX-1@gated-at.bofh.it> |
| In reply to | #1271089 |
On Tue, 17 Nov 2015, Daniel Lezcano wrote: > > Ok, I dropped the patch from my tree. Had it already pushed when I saw your reply. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-11-17 12:50 +0100 |
| Subject | Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings |
| Message-ID | <qvMVQ-4uY-3@gated-at.bofh.it> |
| In reply to | #1271096 |
On 11/17/2015 12:43 PM, Daniel Lezcano wrote: > On 11/17/2015 12:36 PM, Thomas Gleixner wrote: >> On Tue, 17 Nov 2015, Daniel Lezcano wrote: >>> >>> Ok, I dropped the patch from my tree. >> >> Had it already pushed when I saw your reply. >> > > No problem. Better more than less :) Hum, I meant "Better to have too much than not enough". -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Daniel Lezcano <daniel.lezcano@linaro.org> |
|---|---|
| Date | 2015-11-17 12:50 +0100 |
| Subject | Re: [tip:timers/urgent] clocksource/fsl: Avoid harmless 64-bit warnings |
| Message-ID | <qvMVQ-4uY-5@gated-at.bofh.it> |
| In reply to | #1271096 |
On 11/17/2015 12:36 PM, Thomas Gleixner wrote: > On Tue, 17 Nov 2015, Daniel Lezcano wrote: >> >> Ok, I dropped the patch from my tree. > > Had it already pushed when I saw your reply. > No problem. Better more than less :) -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web