From patchwork Thu Nov 10 13:11:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilias Apalodimas X-Patchwork-Id: 623332 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp107993pvb; Thu, 10 Nov 2022 05:11:25 -0800 (PST) X-Google-Smtp-Source: AMsMyM5SWoVr4W5ockoYEwm3XwZOk5Vs5E/LdRZ73qjhM6Q4R9CizY/OqJy6v2dzXVd1gGvtzL0x X-Received: by 2002:a17:906:86d5:b0:7ad:f2f9:2b49 with SMTP id j21-20020a17090686d500b007adf2f92b49mr2557123ejy.94.1668085885542; Thu, 10 Nov 2022 05:11:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668085885; cv=none; d=google.com; s=arc-20160816; b=O0G8VR/IYBukmTZau+FHbGPK0PQnOZxz3pfnIg2vm2boxKAIpohlUkgkLW16FBQNow X7+HMA08GhPTieBdNhsUWJGleVLzG86U9N7m+UjWW4o8xUv7/sswPpG89pcJG5dBpWcY YmpS+S94lP4w72mGKBWwI1V+dwZKlInHBziu4LCvLOK/IE0WJq+e9sa8Fmk2qfDWUmQx fJdaoSb5QmeQFUGmYuhTy/BJLq8s1ac+CiEynpUz1NeUx6GihIXie88Z1uoURslxIHhI dsH1+euGf12sstjTpwfQRIodf/guc0mqT5VzxBwR/lMPwVKBmVea8HVXdMvL92xeBCKg yl5w== 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=F2FFThMkQdkXFOn6O31Kra01hMruBUUIyKg5EUNJb1o=; b=SyoxRCvmbkb+LHjuNO1qCC+7xhHrP/IXg0XGJWGUtHt5G0Dk6LQ1Z9FVzPzwq0YY6k C1indYoScn+EUTYSqwhK6UFBieHx8b+ayW9cydSJlg1U44GvsYHhCJQ5O+o1m9pVL9M7 kx8wHZQUi3GEIKxhfEiN2Xgw+vKT9whUlK8jI2hMzzvifeLTeLJhhEgC2jJ9+NCHAMBY KV8ECUrlfXOjccBDXp/OLtNcXaFvhR48X8XRRan+pRlj4yw/rroGv85DcJqcpRVxMsiL 6vDGsq+o9poCRoaAA66QvMifxHwi0aStbgz8iZVrvgRdPXoHLTZHAkByATJkxh4FTor+ cVxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+lzVIdz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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. [85.214.62.61]) by mx.google.com with ESMTPS id dn1-20020a17090794c100b007adb78db1adsi20848066ejc.804.2022.11.10.05.11.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 05:11:25 -0800 (PST) Received-SPF: pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 as permitted sender) client-ip=85.214.62.61; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+lzVIdz; spf=pass (google.com: domain of u-boot-bounces@lists.denx.de designates 85.214.62.61 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 4FCEE8512C; Thu, 10 Nov 2022 14:11:21 +0100 (CET) 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="h+lzVIdz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id DA98E8515D; Thu, 10 Nov 2022 14:11:19 +0100 (CET) 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-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) (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 4A8EF850FF for ; Thu, 10 Nov 2022 14:11:17 +0100 (CET) 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-wm1-x336.google.com with SMTP id 5so1114393wmo.1 for ; Thu, 10 Nov 2022 05:11:17 -0800 (PST) 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:message-id:reply-to; bh=F2FFThMkQdkXFOn6O31Kra01hMruBUUIyKg5EUNJb1o=; b=h+lzVIdzQKMQGKnS95n2LdRbmHNvvvmb4okhdhc98qSX9bIfxgG4EmIK6YFHgyDIs6 2gpnkcZGCuUqBBojS+GIK11Ab6HgbMmlUXs0LkGT7yV1/L0v01qD7erOh9s+10Uw62Do k79bjkLrmUxnRuTw+Za2ct/rGWNilFqrTAQbwRYlmdU3zlyhiwN0ogJKgH4BNMiWWRpm 22Jg4JhRvjTAoB0NGrp83GtdZ/zBSwRb8rwhcl5K54efGguS3xruwZZiytIbCh1019WX Kn/Py6P4MFyIuKRGLQnD0T6i+mlRwG9YAblMb902oKXwQMy3ocGbK+c8UG43Jc99VtEL IK7g== 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:message-id :reply-to; bh=F2FFThMkQdkXFOn6O31Kra01hMruBUUIyKg5EUNJb1o=; b=PJu2AWr1W0gRHk836GJ0ySbFaNE3M7Y/r7eWoAsATniiE7Av9LfRcE1w+kdRV2TBA5 srTXclMkjoP9M7ljNSaB7yMQzvPlsWSxMdzNHszxPIlnkzuboANrcnEK1RN+FVskCghk Rm2w9nUvTiWqh8rlmpSbg99KvGh5aUbLexyABtmLqUQBMX0F2DuS7oe9VXuAB3LOiZg3 KxhLkcJmimHl9nPwsxRf9CBPnHEmGvpNnEgtKoUM00ZC+mpFWqncSV5dkJzUChBKVmpO nZGKHlmswQkUxvWglKEQJl4W7bEIW9gesagtXA34j1c5GW/AFenYGvanwI5zBaQCWV5W C2vw== X-Gm-Message-State: ANoB5pkVBNqDlh9NWVb2cBnP30pd6Ox0hOADK9oxq3s5z2MziNH3vkbP EIHAAqPCRZMKDeJOIXIhkBfiESiwauQqk2/v X-Received: by 2002:a05:600c:294c:b0:3cf:b1c2:c9df with SMTP id n12-20020a05600c294c00b003cfb1c2c9dfmr11999360wmd.45.1668085876838; Thu, 10 Nov 2022 05:11:16 -0800 (PST) Received: from localhost.localdomain ([2a02:85f:fc35:4b7e:b46:e9a0:216f:aab5]) by smtp.gmail.com with ESMTPSA id l9-20020a05600c4f0900b003c6f3f6675bsm5566909wmq.26.2022.11.10.05.11.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Nov 2022 05:11:16 -0800 (PST) From: Ilias Apalodimas To: u-boot@lists.denx.de Cc: heinrich.schuchardt@canonical.com, Ilias Apalodimas , Heinrich Schuchardt Subject: [PATCH] efi_loader: remove EFI_CALL from efi_file_from_path() Date: Thu, 10 Nov 2022 15:11:08 +0200 Message-Id: <20221110131108.236954-1-ilias.apalodimas@linaro.org> X-Mailer: git-send-email 2.38.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 We now have internal functions for OpenVolume, EFI_FILE_PROTOCOL.Open() and EFI_FILE_PROTOCOL.Close(). So use these instead of wrapping the callsites with EFI_CALL() Signed-off-by: Ilias Apalodimas --- lib/efi_loader/efi_file.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c index c96a7f7ca371..8480ed3007c7 100644 --- a/lib/efi_loader/efi_file.c +++ b/lib/efi_loader/efi_file.c @@ -1111,7 +1111,7 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp) if (!v) return NULL; - EFI_CALL(ret = v->open_volume(v, &f)); + ret = efi_open_volume_int(v, &f); if (ret != EFI_SUCCESS) return NULL; @@ -1131,22 +1131,21 @@ struct efi_file_handle *efi_file_from_path(struct efi_device_path *fp) if (!EFI_DP_TYPE(fp, MEDIA_DEVICE, FILE_PATH)) { printf("bad file path!\n"); - f->close(f); + efi_file_close_int(f); return NULL; } filename = u16_strdup(fdp->str); if (!filename) return NULL; - EFI_CALL(ret = f->open(f, &f2, filename, - EFI_FILE_MODE_READ, 0)); + ret = efi_file_open_int(f, &f2, filename, EFI_FILE_MODE_READ, 0); free(filename); if (ret != EFI_SUCCESS) return NULL; fp = efi_dp_next(fp); - EFI_CALL(f->close(f)); + efi_file_close_int(f); f = f2; }