Re: [U-Boot] [PATCH 1/4] regmap: clean up regmap allocation

2018-04-22 Thread Simon Glass
Hi Masahiro, On 17 April 2018 at 20:38, Masahiro Yamada wrote: > Putting zero length array at the end of struct is a common technique > to embed arbitrary length of members. There is no good reason to let > regmap_alloc_count() branch by "if (count <= 1)". > > As far as I understood the code, re

[U-Boot] [PATCH 1/4] regmap: clean up regmap allocation

2018-04-17 Thread Masahiro Yamada
Putting zero length array at the end of struct is a common technique to embed arbitrary length of members. There is no good reason to let regmap_alloc_count() branch by "if (count <= 1)". As far as I understood the code, regmap->base is an alias of regmap->ranges[0].start, but it is not helpful b