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

Michael Ellerman mpe at ellerman.id.au
Wed Jul 3 21:36:47 AEST 2024


Luca Ceresoli <luca.ceresoli at bootlin.com> 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 at bootlin.com>
> ---
>  arch/powerpc/sysdev/xive/spapr.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Acked-by: Michael Ellerman <mpe at ellerman.id.au> (powerpc)

cheers


More information about the Linuxppc-dev mailing list