From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 97495C433F5 for ; Thu, 29 Sep 2022 10:03:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 21AB484D6C; Thu, 29 Sep 2022 12:02:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="oWa+iAg9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 50EFB84C92; Thu, 29 Sep 2022 12:01:18 +0200 (CEST) Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 350C284CA1 for ; Thu, 29 Sep 2022 12:01:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-oi1-x233.google.com with SMTP id d64so1074539oia.9 for ; Thu, 29 Sep 2022 03:01:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=5m/nHlt8RHylLVajFmdyowF7gdcXObAxA9AR6PcSsPw=; b=oWa+iAg9bRrgZ3KUvkdNSiBxuqj9qOtIpmCuoNP3DN3ZA1RWV2OZ//gS40gHAxLP0s SMnCOV4hXr+uMyoVD/bjLUEW8O18Ku7UHosjWGzKhFyvUwNmaHk9KSSXohgiO0Gtb7su BL904gg0xv4xMKOcU/66CrJkCflCqLM1fnXFI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=5m/nHlt8RHylLVajFmdyowF7gdcXObAxA9AR6PcSsPw=; b=biSAYBQv0korMyaa4uIp9D7WAzuo5uogDJduKF+uyylm+TuLNTDICiqkKhE+F9KMqp ZtQqPfcRsoOr50Cn5/7rqrpG4VdYxEDQlipPjQqjEsylNtPrBcE7EjDj0rxmtm1Snspn YqeuPlknXBPpAZSZcva7ntXKw4c82tnj/SsJ9hYh0w5RuUu225ne1/3IgOqUFDKGQfU9 X2qU4UhezeC3N6lbZIFoVorZSe6uIUXTc79J13L69UMV0N3Ea7aU6x7yHPAkqmEI3k4Y z+TfiuiSKvDme69jVCGl/ZGZ7Ue9z2UZE9o6NjwTkcgMQyOoqDHwwCIswJslLmt1FCVg iV8g== X-Gm-Message-State: ACrzQf3l1amJeFnNko/YdY0n56F03H4BIwYVO1WnVdgLm8uhoUUDMVC3 gw+vrTsbCeuyx1pk8NeG7NvqyxOPKuSN9Hg6caJhaA== X-Google-Smtp-Source: AMsMyM6dCvXAKEsGbJi9fCiNUPf0kWPsrnrdOuHt/5EKWtaitjnFpr2C7vG5dExSHj+JmcB4oX4Nnia1kTfDdbVLiZg= X-Received: by 2002:a05:6808:d53:b0:351:1cab:9c29 with SMTP id w19-20020a0568080d5300b003511cab9c29mr1151113oik.64.1664445667840; Thu, 29 Sep 2022 03:01:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Simon Glass Date: Thu, 29 Sep 2022 04:00:48 -0600 Message-ID: Subject: Re: [PATCH v5 14/15] dm: treewide: Do not use the return value of simple uclass iterator To: Michal Suchanek Cc: U-Boot Mailing List , Bin Meng , Alexander Dahl , Sean Anderson , Samuel Holland , Eddie James , Andrew Jeffery , Heinrich Schuchardt Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Tue, 27 Sept 2022 at 15:38, Michal Suchanek 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 > --- > 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