[PATCH v7 02/14] clk: renesas: r8a78000: Replace sentinel by explicit ID map size

Wolfram Sang wsa+renesas at sang-engineering.com
Wed Dec 2 01:29:30 PST 2026


On Mon, Nov 30, 2026 at 02:12:33PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas at glider.be>
> 
> The use of a sentinel in the clock ID mapping array will become
> cumbersome when the need arises to find out the actual number of
> elements in the array.  Rework the mapping data structure to fix this,
> also improving naming.  Add a CLK_ID_MAP() initialization macro for
> brevity.
> 
> While at it, drop the check for "!map" in clk_id_map_find(), as that
> pointer can never be NULL.
> 
> Suggested-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> Signed-off-by: Geert Uytterhoeven <geert+renesas at glider.be>
> Reviewed-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>

Agreed, using the proper size of the array simplifies understanding and
the naming is really better. Good one!

Reviewed-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas at sang-engineering.com>




More information about the linux-arm-kernel mailing list