Re: [PATCH 19/20] powerpc/xive: convert to of_property_for_each_u32_new()

From: Michael Ellerman
Date: Wed Jul 03 2024 - 07:39:42 EST


Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx> writes:
> Simplify code using of_property_for_each_u32_new() as the two additional
> parameters in of_property_for_each_u32() are not used here.
>
> In this case only the 'prop' variable can be removed and not 'reg',
> because 'reg' is used in _previous_ lines of the same function. There
> is no side effect because the of_property_for_each_u32() macro being
> removed would anyway write 'reg' bwfore reading its value, and 'reg'
> is not used in _following_ lines.
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>
> ---
> arch/powerpc/sysdev/xive/spapr.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx> (powerpc)

cheers