[PATCH] hw/acpi/erst: clean up unused IS_UEFI_CPER_RECORD macro

Ani Sinha posted 1 patch 2 years, 2 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220215153140.128528-1-ani@anisinha.ca
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Ani Sinha <ani@anisinha.ca>, Igor Mammedov <imammedo@redhat.com>
hw/acpi/erst.c | 5 -----
1 file changed, 5 deletions(-)
[PATCH] hw/acpi/erst: clean up unused IS_UEFI_CPER_RECORD macro
Posted by Ani Sinha 2 years, 2 months ago
This change is cosmetic. IS_UEFI_CPER_RECORD macro definition that was added
as a part of the ERST implementation seems to be unused. Remove it.

CC: Eric DeVolder <eric.devolder@oracle.com>
Signed-off-by: Ani Sinha <ani@anisinha.ca>
---
 hw/acpi/erst.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c
index c0a23cf467..de509c2b48 100644
--- a/hw/acpi/erst.c
+++ b/hw/acpi/erst.c
@@ -80,11 +80,6 @@
 #define UEFI_CPER_RECORD_MIN_SIZE 128U
 #define UEFI_CPER_RECORD_LENGTH_OFFSET 20U
 #define UEFI_CPER_RECORD_ID_OFFSET 96U
-#define IS_UEFI_CPER_RECORD(ptr) \
-    (((ptr)[0] == 'C') && \
-     ((ptr)[1] == 'P') && \
-     ((ptr)[2] == 'E') && \
-     ((ptr)[3] == 'R'))
 
 /*
  * NOTE that when accessing CPER fields within a record, memcpy()
-- 
2.25.1


Re: [PATCH] hw/acpi/erst: clean up unused IS_UEFI_CPER_RECORD macro
Posted by Eric DeVolder 2 years, 2 months ago

On 2/15/22 09:31, Ani Sinha wrote:
> This change is cosmetic. IS_UEFI_CPER_RECORD macro definition that was added
> as a part of the ERST implementation seems to be unused. Remove it.
> 
> CC: Eric DeVolder <eric.devolder@oracle.com>
> Signed-off-by: Ani Sinha <ani@anisinha.ca>

Thanks!
Reviewed-by: Eric DeVolder <eric.devolder@oracle.com>

> ---
>   hw/acpi/erst.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/hw/acpi/erst.c b/hw/acpi/erst.c
> index c0a23cf467..de509c2b48 100644
> --- a/hw/acpi/erst.c
> +++ b/hw/acpi/erst.c
> @@ -80,11 +80,6 @@
>   #define UEFI_CPER_RECORD_MIN_SIZE 128U
>   #define UEFI_CPER_RECORD_LENGTH_OFFSET 20U
>   #define UEFI_CPER_RECORD_ID_OFFSET 96U
> -#define IS_UEFI_CPER_RECORD(ptr) \
> -    (((ptr)[0] == 'C') && \
> -     ((ptr)[1] == 'P') && \
> -     ((ptr)[2] == 'E') && \
> -     ((ptr)[3] == 'R'))
>   
>   /*
>    * NOTE that when accessing CPER fields within a record, memcpy()
>