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 BD730C433F5 for ; Sun, 2 Oct 2022 19:19:33 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE9C9848DC; Sun, 2 Oct 2022 21:19:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de 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=suse.de header.i=@suse.de header.b="asXL5QnR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Ho7+BRuJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B39F984949; Sun, 2 Oct 2022 21:19:29 +0200 (CEST) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3E6C582169 for ; Sun, 2 Oct 2022 21:19:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=msuchanek@suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 0DAD62198E; Sun, 2 Oct 2022 19:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664738367; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CbnxG9ywIs4HR9gh9+khcrvQdXrzr3rdOhFrXB/tziw=; b=asXL5QnR93WhOIEKLCJ7u5BvetWouX9P/kF0iAYQLpoVaqS5yqkRBD0q6iNc+EMhfibqab CgWP78X80x/8WR+NDsZG+4o6Gndwv1GJZ48aKXP+cFnLjpyxxefj2UHud/qaHPjWaQ2erD SNxkHP/0lADZyzVay+Mze2zTjJLS6s4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664738367; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CbnxG9ywIs4HR9gh9+khcrvQdXrzr3rdOhFrXB/tziw=; b=Ho7+BRuJkhm5DUSuPn3SiB7St83f/Y6/hCl/ebdhWhIcdyKMvVyedIG2D1gycKN9dTTpoH MqUyGhU44+ZWtbCQ== Received: from kitsune.suse.cz (kitsune.suse.cz [10.100.12.127]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id ED5752C141; Sun, 2 Oct 2022 19:19:26 +0000 (UTC) Date: Sun, 2 Oct 2022 21:19:25 +0200 From: Michal =?iso-8859-1?Q?Such=E1nek?= To: Simon Glass Cc: U-Boot Mailing List Subject: Re: [PATCH v5 04/15] bootstd: Fix listing boot devices Message-ID: <20221002191925.GB28810@kitsune.suse.cz> References: <357a0d89a6557783b991fd7a4db60ce55d7ff930.1664314043.git.msuchanek@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 Thu, Sep 29, 2022 at 04:00:32AM -0600, Simon Glass wrote: > Hi Michal, > > On Tue, 27 Sept 2022 at 15:38, Michal Suchanek wrote: > > > > bootdev_list() uses uclass_*_device_err() to iterate devices. > > However, the only value _err adds is returning an error when the device > > pointer is null, and that's checked anyway. > > > > Also there is some intent to report errors, and that's what > > uclass_*_device_check() is for, use it. > > > > Also print the symbolic error. > > Please drop that. We are talking about using %dE in a printf() string > to show that info (the error number as well as the error string if > available), so you could do that if you like. That sounds like a better solution. Thanks Michal > > But without errno_str support, this change just drops the error code. > > With that: > > Reviewed-by: Simon Glass > > Regards, > Simon