Re: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro

2017-01-13 Thread Arnd Bergmann
On Fri, Jan 13, 2017 at 4:56 PM, Amelie DELAUNAY wrote: > On 01/13/2017 04:32 PM, Arnd Bergmann wrote: >> >> Using the ~ operator on a BIT() constant results in a large 'unsigned >> long' >> constant that won't fit into an 'unsigned int' function argument on 64-bit >> architectures, resulting in a

Re: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro

2017-01-13 Thread Alexandre Belloni
On 13/01/2017 at 15:52:29 +, Russell King - ARM Linux wrote : > On Fri, Jan 13, 2017 at 04:32:53PM +0100, Arnd Bergmann wrote: > > -#define PWR_CR_DBP BIT(8) > > +#define PWR_CR_DBP (u32)BIT(8) > > Shouldn't that have parens around it as it's no longer a simple

Re: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro

2017-01-13 Thread Amelie DELAUNAY
Hi Arnd, On 01/13/2017 04:32 PM, Arnd Bergmann wrote: Using the ~ operator on a BIT() constant results in a large 'unsigned long' constant that won't fit into an 'unsigned int' function argument on 64-bit architectures, resulting in a harmless build warning in x86 allmodconfig: drivers/rtc/rtc-

Re: [PATCH 3/3] rtc: stm32: use 32-bit cast for BIT() macro

2017-01-13 Thread Russell King - ARM Linux
On Fri, Jan 13, 2017 at 04:32:53PM +0100, Arnd Bergmann wrote: > -#define PWR_CR_DBP BIT(8) > +#define PWR_CR_DBP (u32)BIT(8) Shouldn't that have parens around it as it's no longer a simple expression. -- RMK's Patch system: http://www.armlinux.org.uk/develope