[{"id":3679548,"web_url":"http://patchwork.ozlabs.org/comment/3679548/","msgid":"<CAFLszTh0CsEVE6uhaLgZTuG4U=a=k-OTDaG1rjMX7OwKc5Ozcg@mail.gmail.com>","list_archive_url":null,"date":"2026-04-20T19:33:02","subject":"Re: [PATCH 2/2] efi_loader: centralize messaging for\n efi_init_obj_list","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/people/6170/","name":"Simon Glass","email":"sjg@chromium.org"},"content":"Hi Heinrich,\n\nOn 2026-04-18T17:58:12, Heinrich Schuchardt\n<heinrich.schuchardt@canonical.com> wrote:\n> efi_loader: centralize messaging for efi_init_obj_list\n>\n> If efi_init_obj_list() fails we cannot use the UEFI sub-system.\n>\n> * Instead of having messages for this everywhere write an error message\n>   in efi_init_obj_list().\n> * Always use (ret =! EFI_SUCCESS) when checking the return value of\n\nshould be !=\n\n>   efi_init_obj_list().\n> * Remove the return code from the error message as it does not help\n>   users to understand which initialization went wrong.\n>\n> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>\n>\n> boot/bootmeth_efi_mgr.c      |  4 ++--\n>  cmd/bootefi.c                |  5 +----\n>  cmd/bootmenu.c               |  6 +-----\n>  cmd/eficonfig.c              |  6 +-----\n>  cmd/efidebug.c               |  5 +----\n>  cmd/nvedit_efi.c             | 10 ++--------\n>  lib/efi_loader/efi_bootbin.c |  5 +----\n>  lib/efi_loader/efi_bootmgr.c |  5 +----\n>  lib/efi_loader/efi_setup.c   |  2 ++\n>  9 files changed, 12 insertions(+), 36 deletions(-)\n\n> diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c\n> @@ -1310,11 +1310,8 @@ efi_status_t efi_bootmgr_run(void *fdt)\n> +     if (ret != EFI_SUCCESS)\n> +             return CMD_RET_FAILURE;\n\nPre-existing issue: efi_bootmgr_run() returns efi_status_t but\nCMD_RET_FAILURE is 1 - since you are touching this code, please can\nyou fix it to return ret instead, if that is the intent?\n\n> diff --git a/lib/efi_loader/efi_bootbin.c b/lib/efi_loader/efi_bootbin.c\n> @@ -224,11 +224,8 @@ static efi_status_t efi_binary_run_dp(void *image, size_t size, void *fdt,\n> +     if (ret != EFI_SUCCESS)\n> +             return -1;\n\nSimilarly, efi_binary_run_dp() should return ret rather than -1\n\nReviewed-by: Simon Glass <sjg@chromium.org>\n\nRegards,\nSimon","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256\n header.s=google header.b=KmaGlCLe;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de\n (client-ip=85.214.62.61; helo=phobos.denx.de;\n envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org)","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de","phobos.denx.de;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=chromium.org header.i=@chromium.org\n header.b=\"KmaGlCLe\";\n\tdkim-atps=neutral","phobos.denx.de;\n dmarc=pass (p=none dis=none) header.from=chromium.org","phobos.denx.de;\n spf=pass smtp.mailfrom=sjg@chromium.org"],"Received":["from phobos.denx.de (phobos.denx.de [85.214.62.61])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fzwdF4YG4z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 05:33:21 +1000 (AEST)","from h2850616.stratoserver.net (localhost [IPv6:::1])\n\tby phobos.denx.de (Postfix) with ESMTP id 8E70B843E8;\n\tMon, 20 Apr 2026 21:33:19 +0200 (CEST)","by phobos.denx.de (Postfix, from userid 109)\n id 71BCF843FB; Mon, 20 Apr 2026 21:33:18 +0200 (CEST)","from mail-ej1-x630.google.com (mail-ej1-x630.google.com\n [IPv6:2a00:1450:4864:20::630])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits))\n (No client certificate requested)\n by phobos.denx.de (Postfix) with ESMTPS id 73C2C84376\n for <u-boot@lists.denx.de>; Mon, 20 Apr 2026 21:33:16 +0200 (CEST)","by mail-ej1-x630.google.com with SMTP id\n a640c23a62f3a-b8f97c626aaso542842166b.2\n for <u-boot@lists.denx.de>; Mon, 20 Apr 2026 12:33:16 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,\n DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,\n RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham\n autolearn_force=no version=3.4.2","ARC-Seal":"i=1; a=rsa-sha256; t=1776713596; cv=none;\n d=google.com; s=arc-20240605;\n b=LQbvJsWpFi0A74y0gq1Lgai8qi7N/tvz9GUjUB+Ps36tnUeXd2VsgMKFvcHE9S7dCK\n moahDtaVtA7qokXYAtzSFSxfH7CXWBfQFDo+W7V0BxQig0YXiy/5MLCqoNUzlxq5wTm7\n atuovvvYgKwN9KIPGFq2zUqr7pvin+Bx9OHdapYDj60WELdU5i9ejDIs2IHIhvl6HDZt\n /LsjsuxULA9/4gMI9mVV+LKSRESCXxG7hIHmmAuXN6Sjm2F+7IMbaD0cfw29FGpUXCTc\n rSvVVcwS+Y3/KYD055H48GvQKVuGOQwh4CFyPnGMeAO1mQK4ymSL2PjsOQLz/02b0xc6\n wFxQ==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:dkim-signature;\n bh=F0qlHXO6unjbTTT5FxCzGFalT0ARGbjBVpZeEppNxSc=;\n fh=afIVLVOhbzX4mWNbJEdy2Mzjb/g1FacYg8eVZsuwhDM=;\n b=Qye9MD608yJ/6sCZvnzHegRsDz5279RK64TugMy6EFkGVEKihIcTBQ/YxdgNCzwUkc\n WKWXPHjPFYE2s79X4u1IGWTDOMRRpzjRRA2blDDB346sGswqyuLJCnjEIKIVlfGKzCiy\n EZ2EwogQAfSesrL9UHs2Xe9otEpBrWgrY9DoZp9CoXeArEmICOW7mfZ+0XQhBtJrLViq\n Ce22NJdimrtwKzuM1vrivCzpPoPkTeoUspP160fhNFrK4FfVfdDCK0J8Lmk/1Q1A+oAp\n gJm5rsxF6C3e2Cne5K3mhtE57/gsYaVtHy1alZtGZEBSNQgOkpZiJrvlPXPapvomEhJb\n OiZQ==; darn=lists.denx.de","ARC-Authentication-Results":"i=1; mx.google.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=chromium.org; s=google; t=1776713596; x=1777318396; darn=lists.denx.de;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:from:to:cc:subject:date:message-id:reply-to;\n bh=F0qlHXO6unjbTTT5FxCzGFalT0ARGbjBVpZeEppNxSc=;\n b=KmaGlCLejfKYBnGX4na4HsP5s0REdZSdDzKiY7pHkXcCaVJjWvtv/3ngX9cUHqXF9Q\n beZ1X63NC0m7eX6xoZTnfiF1FmKLX9S25zW0rfI8T4EEL2Atdicn2256802vcGSUjYRN\n p12ivq82LDHFo+evcGjkbyMl96INu+H4J0ySE=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776713596; x=1777318396;\n h=cc:to:subject:message-id:date:from:in-reply-to:references\n :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=F0qlHXO6unjbTTT5FxCzGFalT0ARGbjBVpZeEppNxSc=;\n b=f7gstUI9YFlN0BMb+8NcOhkRcPsQ+VaoNz4qJNueQk87umZD1Kx86beketY4tkfzrT\n X9SAVSFdDO4JxSf7JBqvLwlfNARf9UK5mcvLVe0B9M4fo14gDfKJ6Hqfalt7gtCZocjd\n XKuq4eLaJvHhY9vhAiIgCJpnZBiob73r+/GJpC6MPyeqblN7Ge/zJeyrRMDaIIBeCF2G\n LFC4HEubn0NWRmVZVxP6xJwkfB1BbkaYbPfLz+VbsBtvGGFvt93OAKMQfoAyN00QLUrY\n cLWRAA6lrO2l/W2MvREh0+tn37tkdzrmrmxaWSqohln8/qGnQDHVJpJpQrdkS3Dtlo1N\n h7IQ==","X-Forwarded-Encrypted":"i=1;\n AFNElJ8gExNIHa9fhJ0jr1OkdvSFKH2cakYxq+CNlCGABe47iogQdUQAq6Gu2dqUSRu6T4ecd7GHcWE=@lists.denx.de","X-Gm-Message-State":"AOJu0YzLk9iSgsxxY5QoALq4m81ifdGFp13F7kBK2lbmL02Bwb/yEfwP\n sI6SHIf+GLASVkNSIKb7ExGo9PS7h2Rc06GOUVp2oibJsQlFsHFJE65uqO3YQf6CJ5ArFmpX8Qf\n xlfOZnudxG0P/HI+A5gIlSYDvUOI4glJqfXUngTGG","X-Gm-Gg":"AeBDievn+60KLieW5T6+m09RnJuzxILBi0aosJJ9TOh2EBf6MQa2gEs4W+KnCojADub\n FYs62Gf5hlODbmgGQmGY5+Alb75AUqj/yJs51DSRrBNFnDOY9IxM/p+VBDr6DOe17pkS54dFSyB\n D3PIfuM9TyP5xCC5qMDomDbCxzEYx5NSmy4sRj+tSY7gMXMcL5Jrh4aLMnXyHBb6m5yOzw4So9e\n sJVo2lzTMp6u4Ee4rLsVaJRPUQYmQPrNRmVUVJreB/phpl9u5OwLS/YXjT5zBvHQ56nhQTuamG2\n 1g+6X4f6rfcASaXYkMxb","X-Received":"by 2002:a17:906:ba84:b0:ba4:8288:b464 with SMTP id\n a640c23a62f3a-ba48288b8demr690647866b.6.1776713595907; Mon, 20 Apr 2026\n 12:33:15 -0700 (PDT)","MIME-Version":"1.0","References":"<20260418175814.5731-1-heinrich.schuchardt@canonical.com>\n <20260418175814.5731-3-heinrich.schuchardt@canonical.com>","In-Reply-To":"<20260418175814.5731-3-heinrich.schuchardt@canonical.com>","From":"Simon Glass <sjg@chromium.org>","Date":"Tue, 21 Apr 2026 07:33:02 +1200","X-Gm-Features":"AQROBzBEzyP0wkNgTdo4hbTKSJniQNT5wIKNH6WtyG-AW1C3tESbubqALMpsjS0","Message-ID":"\n <CAFLszTh0CsEVE6uhaLgZTuG4U=a=k-OTDaG1rjMX7OwKc5Ozcg@mail.gmail.com>","Subject":"Re: [PATCH 2/2] efi_loader: centralize messaging for\n efi_init_obj_list","To":"heinrich.schuchardt@canonical.com","Cc":"Ilias Apalodimas <ilias.apalodimas@linaro.org>,\n Simon Glass <sjg@chromium.org>,  Tom Rini <trini@konsulko.com>,\n Mark Kettenis <kettenis@openbsd.org>,\n  Patrice Chotard <patrice.chotard@foss.st.com>, Peng Fan <peng.fan@nxp.com>,\n  Christian Marangi <ansuelsmth@gmail.com>,\n Sughosh Ganu <sughosh.ganu@arm.com>,\n  Casey Connolly <casey.connolly@linaro.org>,\n =?utf-8?q?Vincent_Stehl=C3=A9?= <vincent.stehle@arm.com>,\n  Adriano Cordova <adrianox@gmail.com>, Javier Tia <floss@jetm.me>,\n  Jerome Forissier <jerome.forissier@arm.com>,\n Ying-Chun Liu <paul.liu@linaro.org>, u-boot@lists.denx.de","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 <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<https://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n <mailto:u-boot-request@lists.denx.de?subject=subscribe>","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>","X-Virus-Scanned":"clamav-milter 0.103.8 at phobos.denx.de","X-Virus-Status":"Clean"}}]