Re: [PATCH] regmap: Fix possible shift overflow in regmap_field_init()

2015-06-16 Thread Mark Brown
On Tue, Jun 16, 2015 at 01:53:19PM +0200, Maxime Coquelin wrote: > The way the mask is generated in regmap_field_init() is wrong. > Indeed, a field initialized with msb = 31 and lsb = 0 provokes a shift > overflow while calculating the mask field. Applied, thanks. signature.asc Description: Digi

[PATCH] regmap: Fix possible shift overflow in regmap_field_init()

2015-06-16 Thread Maxime Coquelin
The way the mask is generated in regmap_field_init() is wrong. Indeed, a field initialized with msb = 31 and lsb = 0 provokes a shift overflow while calculating the mask field. On some 32 bits architectures, such as x86, the generated mask is 0, instead of the expected 0x. This patch uses