From: Heinrich Schuchardt Date: Fri, 9 Jun 2017 08:53:10 +0200 Subject: [U-Boot] [PATCH v2 3/3] dm: core: Add uclass_first/next_device_check() In-Reply-To: References: <20170424021045.11320-1-sjg@chromium.org> <20170424021045.11320-3-sjg@chromium.org> Message-ID: <0748680c-9764-fe82-ee2f-863c4f6886eb@gmx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/09/2017 12:41 AM, Simon Glass wrote: > Hi, > > On 23 April 2017 at 20:10, Simon Glass wrote: >> Sometimes it is useful to iterate through all devices in a uclass and >> skip over those which do not work correctly (e.g fail to probe). Add two >> new functions to provide this feature. >> >> The caller must check the return value each time to make sure that the >> device is valid. But the device pointer is always returned. >> >> Signed-off-by: Simon Glass >> --- >> >> Changes in v2: >> - Return even device, even those with errors >> - Rename the functions >> >> drivers/core/uclass.c | 27 +++++++++++++++++ >> include/dm/uclass.h | 31 ++++++++++++++++++++ >> test/dm/test-fdt.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++ >> 3 files changed, 138 insertions(+) > > > This patch has been sitting around for a while. Does anyone think it is useful? > > Regards, > Simon > Hello Simon, the patch is needed as basis for a patch to bootefi. Cf. https://patchwork.ozlabs.org/patch/752214/ Best regards Heinrich