From patchwork Mon Sep 6 03:04:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahisa Kojima X-Patchwork-Id: 507325 Delivered-To: patch@linaro.org Received: by 2002:a02:8629:0:0:0:0:0 with SMTP id e38csp2992309jai; Sun, 5 Sep 2021 20:02:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdM0t+/JHQMRs32SjtMeyRGHMP0kS96YMvFqnUvQHxiTEsVqO3mxaa2PgceFHQGQvUX2YH X-Received: by 2002:a17:906:f743:: with SMTP id jp3mr11605522ejb.120.1630897332607; Sun, 05 Sep 2021 20:02:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630897332; cv=none; d=google.com; s=arc-20160816; b=zIhY2+CYyI4oefeUXa2XMQ5zseixS8q5CRXNOp85yzu+DXntix2Kz+ZskUWEpM0+Gf nekHtSVx3uHSgorVRuuGg8VS6hRgCDY1ArPIVb+OgNo/ICqGG4I9ZoN6+9g19nNoOo2R 4wmgS9xEkQxxtzwCsR/Ra4/vJAIYTe1SZ/G2jQf44KDS2nW8j1nxVlC9kAsHdYyWpG4j iqzS+uD1t043U3LYEPtUqEx68FmMTPB64v+Ufx4Nh+A10cgo8QoExLxcA1qQZCduiMZy zg7QfWc2wlTle6S8tUqKa208Q9j+8XSFUEMEXQq5qLD0rWi2kD4csHjYPKMSXiKNhew9 snzA== 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:message-id:date:subject:to:from :dkim-signature; bh=U4sksx9/Z8ROEjtlyIzbzb2ZC7d/01AVHy3zfvLEZ9s=; b=lP8MLwJzvNrjr+8r4vExz3exh0pJGkXcBZxepitl50XtLtxjSljPZcPOfXUwrkBvb4 IZShGkgnnBCXH5ar4bmC/SmjN3Sd+EI5D+bu+S4kEoqI5Ja0fY4hT1o6P8ePUSizSSFL BKsdyYa/LY8HHxVGBVNdsVl2gv1+umJh2a7sQ3+Btfpe6vb8yiSRNzrXYN/JsASGzey4 IVl5ILLTphllr0IPNdTfSMGCfOHLswKxNBwnTCijKnHFCx/cT7XgJSH2RnXO6ZXN5wsK a5VZ+bxKRHkR/rFRsYzQOVXCmwpVDjxoDmxBXm1f46lPXMkdpxemkVAXIHg6MPllad+1 yJ/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cZ07Qjud; 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 j4si6185015eje.704.2021.09.05.20.02.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Sep 2021 20:02:12 -0700 (PDT) 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=cZ07Qjud; 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 9A3978310F; Mon, 6 Sep 2021 05:02:09 +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="cZ07Qjud"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D129D8312C; Mon, 6 Sep 2021 05:02:07 +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-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) (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 AF0CD82D5B for ; Mon, 6 Sep 2021 05:02:04 +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=masahisa.kojima@linaro.org Received: by mail-pg1-x532.google.com with SMTP id g184so5321519pgc.6 for ; Sun, 05 Sep 2021 20:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id; bh=U4sksx9/Z8ROEjtlyIzbzb2ZC7d/01AVHy3zfvLEZ9s=; b=cZ07Qjud0e5VQfT9yEBPG45O9uSZ+p3d3RSkV4vFQpOJdkawGJL1PNHjrB8vE54oHU 9ZSX8HtuzC2S8zKYsUwwQ390mXQMIUSMfTxoPBOanCJQQxTh8kobM4ejvYhipgcsvxQK L8ae9YEPSY05h1I3CA3kVjZM8br5G0pIHM4eqFoM+UKmDRdq8/5HmplaQJgAlAhddGLm rOmuH6IDMn8ZyNrS1r3f0gZAJMVrIFoYYD/9BZDstjQFVMJdJnVOpsOTh6ch3lkIN8il VgXJOisovHNaV4QATnpk4SvEnqvN5vxUivCv5X6+90pHar0of8mtY38KnwQZJTxJXLRj KsRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=U4sksx9/Z8ROEjtlyIzbzb2ZC7d/01AVHy3zfvLEZ9s=; b=Ala7pwpZmZIiigu4mtkogizwryHIB/iTgDBK6u64TqFc0DTc68RwnYqJpceZ9MCIFH zMHlYygPwdCdEkjcXMNaRzxDxLCsDcju46B8j3OxeBPo16LfVn8OZAUoPNonRBmTYFmz SKcBitk4ZR8SWRUyeOpnDxIxIxwvY48MCer5Zo2J4xDv7XDy3wbZXXkaXNWmSuI7t+ou r9+NbMSNPxNID6vPOGSR7bu6+uuWsCzJYKw0IFqzhgucCDZi6htKK0W3GBbAQGIQ/HcW XXZySMS3GFMUKNEzwXSZky05KxJRmo32VXeaTHCeKnouFRThJKDCD4ddejDE9dgOiNnE dMig== X-Gm-Message-State: AOAM532PGjUGeqsPx/ZgJcz3Y1HtYGOR0YwxTyKKJO6B6Jd60fvPFOV2 P0qCwb56f6byYdEJbnFF0tKCcw== X-Received: by 2002:a63:cc01:: with SMTP id x1mr10129764pgf.304.1630897322831; Sun, 05 Sep 2021 20:02:02 -0700 (PDT) Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id a71sm760265pfd.86.2021.09.05.20.02.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Sep 2021 20:02:02 -0700 (PDT) From: Masahisa Kojima To: Heinrich Schuchardt , Alexander Graf , Ilias Apalodimas , u-boot@lists.denx.de Subject: [PATCH] efi_loader: boot_service_capability_min should be capitalized Date: Mon, 6 Sep 2021 12:04:12 +0900 Message-Id: <20210906030412.3640-1-masahisa.kojima@linaro.org> X-Mailer: git-send-email 2.17.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean boot_service_capability_min is constant, it should be capitalized. Signed-off-by: Masahisa Kojima --- include/efi_tcg2.h | 2 +- lib/efi_loader/efi_tcg2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.17.1 Acked-by: Ilias Apalodimas Reviewed-by: Heinrich Schuchardt diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h index c99384fb00..5a1a36212e 100644 --- a/include/efi_tcg2.h +++ b/include/efi_tcg2.h @@ -130,7 +130,7 @@ struct efi_tcg2_boot_service_capability { }; /* up to and including the vendor ID (manufacturer_id) field */ -#define boot_service_capability_min \ +#define BOOT_SERVICE_CAPABILITY_MIN \ offsetof(struct efi_tcg2_boot_service_capability, number_of_pcr_banks) #define TCG_EFI_SPEC_ID_EVENT_SIGNATURE_03 "Spec ID Event03" diff --git a/lib/efi_loader/efi_tcg2.c b/lib/efi_loader/efi_tcg2.c index b268a02976..62ae102033 100644 --- a/lib/efi_loader/efi_tcg2.c +++ b/lib/efi_loader/efi_tcg2.c @@ -607,8 +607,8 @@ efi_tcg2_get_capability(struct efi_tcg2_protocol *this, goto out; } - if (capability->size < boot_service_capability_min) { - capability->size = boot_service_capability_min; + if (capability->size < BOOT_SERVICE_CAPABILITY_MIN) { + capability->size = BOOT_SERVICE_CAPABILITY_MIN; efi_ret = EFI_BUFFER_TOO_SMALL; goto out; }