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

Masahiro Yamada yamada.masahiro at socionext.com
Mon Apr 23 04:30:42 UTC 2018


2018-04-19 12:14 GMT+09:00 Masahiro Yamada <yamada.masahiro at socionext.com>:
> 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 but make the code
> just ugly.
>
> Rename regmap_alloc_count() to regmap_alloc() because the _count
> suffix seems pointless.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro at socionext.com>
> ---

Simon gave r-b to v1.
Copy-pasting it to v2.

Reviewed-by: Simon Glass <sjg at chromium.org>


-- 
Best Regards
Masahiro Yamada


More information about the U-Boot mailing list