diff mbox series

efi_loader: boot_service_capability_min should be capitalized

Message ID 20210906030412.3640-1-masahisa.kojima@linaro.org
State Accepted
Commit bad49da2bc4702dc3a12b6a4f07a87a70bf521b4
Headers show
Series efi_loader: boot_service_capability_min should be capitalized | expand

Commit Message

Masahisa Kojima Sept. 6, 2021, 3:04 a.m. UTC
boot_service_capability_min is constant, it should be capitalized.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>

---
 include/efi_tcg2.h        | 2 +-
 lib/efi_loader/efi_tcg2.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.17.1

Comments

Ilias Apalodimas Sept. 6, 2021, 6:19 a.m. UTC | #1
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


On Mon, 6 Sept 2021 at 06:02, Masahisa Kojima
<masahisa.kojima@linaro.org> wrote:
>

> boot_service_capability_min is constant, it should be capitalized.

>

> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>

> ---

>  include/efi_tcg2.h        | 2 +-

>  lib/efi_loader/efi_tcg2.c | 4 ++--

>  2 files changed, 3 insertions(+), 3 deletions(-)

>

> 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;

>         }

> --

> 2.17.1

>
Heinrich Schuchardt Sept. 11, 2021, 8:39 a.m. UTC | #2
On 9/6/21 5:04 AM, Masahisa Kojima wrote:
> boot_service_capability_min is constant, it should be capitalized.

>

> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>


Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
diff mbox series

Patch

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;
 	}