On Mon, Oct 19, 2020 at 11:58:56PM +0100, Daniel Scally wrote:
> Use the new software_node_unregister_nodes_reverse() function to
> unwind this array in a cleaner way.

Reviewed-by: Andy Shevchenko <[email protected]>

> Suggested-by: Andriy Shevchenko <[email protected]>
> Signed-off-by: Daniel Scally <[email protected]>
> ---
> Changes in v3:
>       - patch introduced.
> 
>  lib/test_printf.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/lib/test_printf.c b/lib/test_printf.c
> index 7ac87f18a..c63365570 100644
> --- a/lib/test_printf.c
> +++ b/lib/test_printf.c
> @@ -644,9 +644,7 @@ static void __init fwnode_pointer(void)
>       test(second_name, "%pfwP", software_node_fwnode(&softnodes[1]));
>       test(third_name, "%pfwP", software_node_fwnode(&softnodes[2]));
>  
> -     software_node_unregister(&softnodes[2]);
> -     software_node_unregister(&softnodes[1]);
> -     software_node_unregister(&softnodes[0]);
> +     software_node_unregister_nodes_reverse(softnodes);
>  }
>  
>  static void __init
> -- 
> 2.17.1
> 

-- 
With Best Regards,
Andy Shevchenko


Reply via email to