[PATCH v5 14/15] dm: treewide: Do not use the return value of simple uclass iterator

Simon Glass sjg at chromium.org
Thu Sep 29 12:00:48 CEST 2022


On Tue, 27 Sept 2022 at 15:38, Michal Suchanek <msuchanek at suse.de> wrote:
>
> uclass_first_device/uclass_next_device return value will be removed,
> don't use it.
>
> With the current implementation bus is equivalent to !ret. It i
> redundant to check both, ret check can be replaced with bus check, and
> ret check inside the iteration is dead code.
>
> Signed-off-by: Michal Suchanek <msuchanek at suse.de>
> ---
> v5: - consolidate multiple similar patches
> ---
>  cmd/virtio.c               |  9 +++------
>  drivers/dma/dma-uclass.c   |  7 +++----
>  drivers/gpio/gpio-uclass.c | 14 ++++++--------
>  drivers/w1/w1-uclass.c     |  9 ++-------
>  4 files changed, 14 insertions(+), 25 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list