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

Wolfram Sang wsa+renesas at sang-engineering.com
Wed Dec 2 02:19:09 PST 2026


On Mon, Nov 30, 2026 at 02:12:42PM +0100, Geert Uytterhoeven wrote:
> From: Geert Uytterhoeven <geert+renesas at glider.be>
> 
> The use of a sentinel in the module 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.  Let mod_id_map_find() return an index, to be
> used for indexing additional mapping target arrays later.
> Add a MOD_ID_MAP() initialization macro for brevity.
> 
> While at it, drop the check for "!map" in mod_id_map_find(), as that
> pointer can never be NULL.
> 
> 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>

As helpful as the similar change in the clock driver!

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