From patchwork Thu Oct 6 13:08:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 612919 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp209154pvb; Thu, 6 Oct 2022 06:09:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5n6DxnkfQt12LWd136afME0Z2MR09LjrxKHp5Pvlwth7oA4HkuQLnLPAzZD1Yy4sYMotHG X-Received: by 2002:a17:907:9491:b0:78d:337e:580f with SMTP id dm17-20020a170907949100b0078d337e580fmr3935965ejc.464.1665061770358; Thu, 06 Oct 2022 06:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665061770; cv=none; d=google.com; s=arc-20160816; b=vFpQJ2hXUjKGuCYVRJKyjAK+j7SbphXc4AKKoiiOdNR2kmqx+yNJsJ6KxVQPxaOyum 5JsY3ikt8SRaMJb7YN2zROca3rXyLCe6QTA6oP77gGh73XfOlSbZvLOHafxsPBZFZ/jy k/6as+wSHDpUy9HumvdixJp18b+n1/3A/E5b62KcfDAnlYz4/qXudOJz1237u3KQMxs0 iSQ9NZc/l/afFaSqmeWxZM4d0+0yjlAdEMSxkI9BjNP1cINbYjacgkF+4dx5fYvHX7iP r1KOk2+OOO7vFSPEWcbBBxbe+NEjOEQHoeTSRkQz28LAewndUQwMU2wW4LfcPtJ7Edf2 iDCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=lWwTAUoiDplw7B4Ads1TI9UzBUVvx2oicB2YgJ3Od5U=; b=p9ulPmDIVZ1yuaY3tgMIrYp8v4udoC4/u0km2nmOW3V6TjGNUOcI1y7jax3wn5I43b AUyorUQoBGU61Ulrg3EruwiP6jQVSwZ9rXNGIvhp+ZYhL72Rpwvxo2dbSonK179oLf9k VW73MVKzk8LQtsD1k3mnOD/lJDZWBnKVZ66U2UZBtjqTUDpgMsrUslI1IumFAVCYRPpW DOkvuUwfqv02ndMf4JT0YqNl8bh8RHuIKJ1K/qpQm1SMt4lYjvyHftOVKcGwBR/PEr+0 WekMypWAbVtHEhNpagvRpm/9YrDxDlyevL70gN89FgtfItRm7g8JI4DLdnCdY9I7QgJZ VN6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="phE/KqOT"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from phobos.denx.de (phobos.denx.de. [2a01:238:438b:c500:173d:9f52:ddab:ee01]) by mx.google.com with ESMTPS id b5-20020a056402084500b004483a12fba9si19102929edz.210.2022.10.06.06.09.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 06:09:30 -0700 (PDT) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="phE/KqOT"; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 2a01:238:438b:c500:173d:9f52:ddab:ee01 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DBD7784DC0; Thu, 6 Oct 2022 15:09:24 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="phE/KqOT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AED7F84D94; Thu, 6 Oct 2022 15:08:59 +0200 (CEST) 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,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) (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 C740A84567 for ; Thu, 6 Oct 2022 15:08:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-ej1-x62c.google.com with SMTP id k2so4491438ejr.2 for ; Thu, 06 Oct 2022 06:08:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=lWwTAUoiDplw7B4Ads1TI9UzBUVvx2oicB2YgJ3Od5U=; b=phE/KqOTbHfOFlC3P5hmgK55mvBWz4LmJpFx7dcdOrKAURbSIk0DIGA4qsf6nIjfxn QZOAvZe+PeJdiXgrYGkAt/5rN2+5xz/z5Ls71M9Jvmv+CMXfNHTKLYeuLdlmuUnJ09oT OkCVKy1xzj+S/9Z9ousR+XL1pm9x3y43ZO1Fk33ZHVw0KhoKGsXCp+JBCEUC/8GsTE5g Mh4qYVnzu57Ko5XwgyxHuBcxuEGt1kaTGfPxnO8avh8f9qNyh1t19Ez4uMsp+/mw3aIY LnVRyBRzOoQBm3bjixnRZobRbsTNI+abpcO5DXQXZzp4AI2gvl+AdemOPXYO1vySFQsB kTKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=lWwTAUoiDplw7B4Ads1TI9UzBUVvx2oicB2YgJ3Od5U=; b=CSyeI8A6y8oEn8cTZK77aK9KCqA6+sczvkwrh440bQLYWPKyFvbPUYcSVzdEY89ckP BiIvw0yI1jOI/ycIQGg0xyRk/OZBVdbTaR5UQ3updSMHJjyv0nlP+XxaCmoFzwer2PLM VCqvhr3QPR6tQD4UIX6TSyuEgeUTunzxH1jdcBq8ilQ4W9rRDWInqYxN9ZPW1tB3oPLr ZC9c6O3CnMZOiQkFj1fsyWosfJnbJxkiReWBfdDHWvIJFS/rLVnYVYWm/Zxgh3TmUeFQ DfLh0bOJIz7eJF8W2DXQ5vlJR3wzDm2M/gnlDNU4WRjd0ZGrOBIpKrBq9LcvpIyJI/vO beYA== X-Gm-Message-State: ACrzQf3hzkwNtqgIyB3+pZblX/MWbRJnyf7oF/PrVa2y6YmZwRAUCpsv NtbRdSYV30Z8m1ZCF7FeDDbuMg== X-Received: by 2002:a17:907:7eaa:b0:782:3d2b:20b0 with SMTP id qb42-20020a1709077eaa00b007823d2b20b0mr3897063ejc.746.1665061736330; Thu, 06 Oct 2022 06:08:56 -0700 (PDT) Received: from hades.. (ppp046103015185.access.hol.gr. [46.103.15.185]) by smtp.gmail.com with ESMTPSA id e7-20020a056402104700b00459f4974128sm807211edu.50.2022.10.06.06.08.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 06:08:55 -0700 (PDT) From: Ilias Apalodimas To: xypron.glpk@gmx.de Cc: takahiro.akashi@linaro.org, Ilias Apalodimas , u-boot@lists.denx.de Subject: [PATCH 0/2] Clean up protocol installation API Date: Thu, 6 Oct 2022 16:08:42 +0300 Message-Id: <20221006130847.22861-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 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! This is v1 of [0] trying to clean up the handle and protocol management APIs. [0] https://lore.kernel.org/u-boot/4766d2b2-7fd3-0206-37ee-709a6fe2b84f@gmx.de/T/ Changes since RFC: patch [1/2]: - Use ret instead of r as a return variable - Use goto for handling efi_va_end() patch [2/2]: - Check the return value of efi_uninstall_multiple_protocol_interfaces Ilias Apalodimas (2): efi_loader: define internal implementations of install/uninstallmultiple cmd: replace efi_create_handle/add_protocol with InstallMultipleProtocol cmd/bootefi.c | 17 ++- include/efi.h | 2 + include/efi_loader.h | 6 +- lib/efi_loader/efi_boottime.c | 214 +++++++++++++++++++++++-------- lib/efi_loader/efi_capsule.c | 15 ++- lib/efi_loader/efi_console.c | 14 +- lib/efi_loader/efi_disk.c | 10 +- lib/efi_loader/efi_load_initrd.c | 15 +-- lib/efi_loader/efi_root_node.c | 44 +++---- 9 files changed, 224 insertions(+), 113 deletions(-)