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 614DEC25B06 for ; Thu, 4 Aug 2022 20:31:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 76C4584858; Thu, 4 Aug 2022 22:31:04 +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="nU2wLKsp"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 46298839F6; Thu, 4 Aug 2022 22:31:02 +0200 (CEST) Received: from mail-vs1-xe33.google.com (mail-vs1-xe33.google.com [IPv6:2607:f8b0:4864:20::e33]) (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 D24A684852 for ; Thu, 4 Aug 2022 22:30:58 +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-vs1-xe33.google.com with SMTP id q190so598695vsb.7 for ; Thu, 04 Aug 2022 13:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc; bh=+BqE9AZVRz5O6m38iIkTh6NjqGjo2vELniJ6kFAC4kY=; b=nU2wLKsphzRV6iHYEcgeFT5auStQCQ2McsjK2drdcvCMUtwOlCyyVocIs8QBg9J00Y 4kWt8/P63r4or1mOaaoyn34Vnnpn513Bi5HOAbHMZjZyAFuQ3r8sC75F8pk95Y9WPicy cqe8dvzhRAfIN8zpBtxp9pPtuSvRc9sPmahq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc; bh=+BqE9AZVRz5O6m38iIkTh6NjqGjo2vELniJ6kFAC4kY=; b=sAaEbEPRfd/WK2fiTc5wkStswSoAaI9yffv4X8K3KGkQMZupXZ98qaTH5QGxXUfygd y2beM7Y5gKPsCPkmld17Lao1ixlIa+1lpyqDYH/rMdsAXqlVCaCFbCefhnzT33KcbQ7U yFpvRzutMpAUh1LGFZya91SJksF5pooaajhhAKTKKGqN+UH4ILNTdHx2tP7R/EZVtl2s J0jzBeNqBn0gXS3j2hcaTCsf4Yr8HD8cabSEVL2/HRxHPOzTF6IbNcCWE1Jx1KXPqTAf i1lclos7CDpUMg++WtetPRbaTswUkEYYZrdXmSlqKX0/fE8OF8G5MFhZYWmzYjEjdrdD f/YA== X-Gm-Message-State: ACgBeo0tNnB8c5mFnLvdABV3bD5mFjlGoD1O5hQT3qkmwnUk2ZrSEEPD YCPu8yiy/0hgm19ywmHdc/t7nPK8ITsFWAUZW2028A== X-Google-Smtp-Source: AA6agR6vEHoKkxKuHdBgXpTn0mf0qv3EsCtBlpMOyh8EHPHEW6fVFUGZwVsklEbBfMqQm7gGvDVFD8THEFw0KtYDZiY= X-Received: by 2002:a67:dd96:0:b0:358:3dc0:fd8c with SMTP id i22-20020a67dd96000000b003583dc0fd8cmr1705369vsk.51.1659645056569; Thu, 04 Aug 2022 13:30:56 -0700 (PDT) MIME-Version: 1.0 References: <20220804175944.4130-1-msuchanek@suse.de> <20220804193647.GF17705@kitsune.suse.cz> In-Reply-To: <20220804193647.GF17705@kitsune.suse.cz> From: Simon Glass Date: Thu, 4 Aug 2022 14:30:41 -0600 Message-ID: Subject: Re: [PATCH] dm: core: Do not stop uclass iteration on error. To: =?UTF-8?Q?Michal_Such=C3=A1nek?= Cc: U-Boot Mailing List , =?UTF-8?B?VmlrdG9yIEvFmWl2w6Fr?= , Tomas Hlavacek , Marek Vasut , Pavel Herrmann Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Hi Michal, On Thu, 4 Aug 2022 at 13:36, Michal Such=C3=A1nek wrote= : > > Hello, > > On Thu, Aug 04, 2022 at 01:22:57PM -0600, Simon Glass wrote: > > Hi Michal, > > > > On Thu, 4 Aug 2022 at 11:59, Michal Suchanek wrote: > > > > > > When probing a device fails NULL pointer is returned, and other devic= es > > > cannot be iterated. Skip to next device on error instead. > > > > > > Fixes: 6494d708bf ("dm: Add base driver model support") > > > Signed-off-by: Michal Suchanek > > > --- > > > drivers/core/uclass.c | 30 +++++++++++++++++++++--------- > > > 1 file changed, 21 insertions(+), 9 deletions(-) > > > > Are you able to create a test for this, e.g. in test/dm/core.c or test-= fdt.c ? > > > > Some sandbox devices can be made to give an error, so the test can > > check the logic. > > > > Strangely enough, this is actually a very big change, so we need to be = careful. > > Right, I can have a look at doing some tests. > > Knowing what the problem is designig a test should not be too difficult. > > It does not make the change any smaller but it can at least prevent > regressions. > > Not sure when I get to it, though. It's pretty easy. But we cannot make any significant change to driver model without sandbox tests. It is a core system with the potential to break a lot of boards. Regards, Simon