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 C8785C433FE for ; Thu, 29 Sep 2022 10:04:05 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6A49284D99; Thu, 29 Sep 2022 12:02:41 +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="E+29Kf4e"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D1AC984CD1; Thu, 29 Sep 2022 12:01:26 +0200 (CEST) Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) (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 15EDE84CF2 for ; Thu, 29 Sep 2022 12:01:22 +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-oa1-x36.google.com with SMTP id 586e51a60fabf-1280590722dso1240547fac.1 for ; Thu, 29 Sep 2022 03:01:21 -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=aOaEdmXqrDqtPQU/HTR76X2lJl+cEyqv/1l3FyihA8k=; b=E+29Kf4eBMbVH9wZc3cCVAnom6jsdF0NwPXNZib6LX+6Sz4Dzd/HGOIfkyQ8N1O3Yz 6IFWuK+x1esKTBSykjz0+c7rIbrhYeLHlrO71Afq833nyZRZui5rVipCvhwryZGoXiAG Su5IVxQo+C0GnEf3iGKCfFSBs+ami6xG4TsGE= 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=aOaEdmXqrDqtPQU/HTR76X2lJl+cEyqv/1l3FyihA8k=; b=eXiLn0AP5Whr0WRozU+xcpERt84GTwNvIKUJsQliUIvkZYQk0NuokLG9VUTv8tuO0A c3DduWaHuiWQI6LfGBjoLxawFH9uwCwm5sIaKLfTSi4Z4syWgOXQc78DTPF7ZTaJkz38 yBJxMvmoWq/YVrRgDyF0ifUe5fm4ARg8BUaUEa6RyXdf8vq+S4GGkOzDqDS5JWt4FJfv 3pcKuydn/ZUbLBSbuGJDlBCme1j4dCVJNgbS8LJ/XAP76amCM95liU4hV1NZh9O1VX+d zbvAjUMS90pqw4vymkKhtwtsyTRRTLgXUfPwf0z48vOcU8jdlo3UoOsCV8s+QtEpHpKA xLFw== X-Gm-Message-State: ACrzQf00svUzvBTimiFdj2kDWuMaRhfyPsz73GR9/E5awN2pw1WTsF2n CocqqnikRMiRAfu6WMMQoyowHQVd09ijaYbGkgmOvA== X-Google-Smtp-Source: AMsMyM6F5ryY3yMg/n4qAaTqJB6B81nTjOc5VMk5b2GYYJcdfOlMyQODZnwkJIGffUD2sRb7VpI24J8d9iuPsXfp440= X-Received: by 2002:a05:6870:a2cc:b0:131:83eb:60b6 with SMTP id w12-20020a056870a2cc00b0013183eb60b6mr7158106oak.170.1664445680547; Thu, 29 Sep 2022 03:01:20 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Simon Glass Date: Thu, 29 Sep 2022 04:00:31 -0600 Message-ID: Subject: Re: [PATCH v5 03/15] dm: pci: Fix device PCI iteration To: Michal Suchanek Cc: U-Boot Mailing List , Bin Meng , Andrew Scull , Stefan Roese , Vladimir Oltean , =?UTF-8?Q?Pali_Roh=C3=A1r?= , =?UTF-8?Q?Pierre=2DCl=C3=A9ment_Tosi?= 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: > > When there is no PCI bus uclass_first_device will return no bus and no > error which will result in pci_find_first_device calling > skip_to_next_device with no bus, and the bus is only checked at the end > of the while cycle, not the beginning. > > Also stop dealing with the return value of > uclass_first_device/uclass_next_device - once the iteration is fixed to > continue after an error there is nothing meaningful to get anymore. > > Fixes: 76c3fbcd3d ("dm: pci: Add a way to iterate through all PCI devices") Please split the patches, with the first one having the fixes tag. The second part is not a fix, but an update based on your changes in this series. > Signed-off-by: Michal Suchanek > --- > drivers/pci/pci-uclass.c | 19 +++++-------------- > 1 file changed, 5 insertions(+), 14 deletions(-) with that: Reviewed-by: Simon Glass