[PATCH 2/5] acpi: hest: change type from hex to dec as in ACPI spec
Alex Hung
alex.hung at canonical.com
Tue Jun 20 01:39:10 UTC 2017
ACPI spec does not use hex numbers for HEST. It is easier to compare to
spec when types are written in decimal numbers. There are no functional
changes.
Signed-off-by: Alex Hung <alex.hung at canonical.com>
---
src/acpi/hest/hest.c | 16 ++++++++--------
src/lib/include/fwts_acpi.h | 16 ++++++++--------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/acpi/hest/hest.c b/src/acpi/hest/hest.c
index cfcb3b6..85e1bf7 100644
--- a/src/acpi/hest/hest.c
+++ b/src/acpi/hest/hest.c
@@ -823,31 +823,31 @@ static int hest_test1(fwts_framework *fw)
uint16_t *type = (uint16_t *)data;
switch (*type) {
- case 0x00:
+ case 0:
hest_check_ia32_arch_machine_check_exception(fw, &length, &data, &passed);
hest_type_00_count++;
break;
- case 0x01:
+ case 1:
hest_check_ia32_arch_corrected_machine_check(fw, &length, &data, &passed);
hest_type_01_count++;
break;
- case 0x02:
+ case 2:
hest_check_fwts_acpi_table_hest_nmi_error(fw, &length, &data, &passed);
hest_type_02_count++;
break;
- case 0x06:
+ case 6:
hest_check_pci_express_root_port_aer(fw, &length, &data, &passed);
break;
- case 0x07:
+ case 7:
hest_check_pci_express_device_aer(fw, &length, &data, &passed);
break;
- case 0x08:
+ case 8:
hest_heck_pci_express_bridge_aer(fw, &length, &data, &passed);
break;
- case 0x09:
+ case 9:
hest_check_generic_error_source(fw, &length, &data, &passed);
break;
- case 0x0a:
+ case 10:
hest_check_generic_error_source_v2(fw, &length, &data, &passed);
break;
default:
diff --git a/src/lib/include/fwts_acpi.h b/src/lib/include/fwts_acpi.h
index b34a1aa..d22f1f4 100644
--- a/src/lib/include/fwts_acpi.h
+++ b/src/lib/include/fwts_acpi.h
@@ -1438,7 +1438,7 @@ typedef struct {
uint32_t misc_register_msr_address;
} __attribute__ ((packed)) fwts_acpi_table_hest_machine_check_bank;
-/* Section 18.3.2.1 Table 18-322, Type 0x00 */
+/* Section 18.3.2.1 Table 18-322, Type 0 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1454,7 +1454,7 @@ typedef struct {
fwts_acpi_table_hest_machine_check_bank bank[0];
} __attribute__ ((packed)) fwts_acpi_table_hest_ia32_machine_check_exception;
-/* Section 18.3.2.2 Table 18-324, Type 0x01 */
+/* Section 18.3.2.2 Table 18-324, Type 1 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1469,7 +1469,7 @@ typedef struct {
fwts_acpi_table_hest_machine_check_bank bank[0];
} __attribute__ ((packed)) fwts_acpi_table_hest_ia32_corrected_machine_check;
-/* Section 18.3.2.2.1, 18-325, Type 0x02 */
+/* Section 18.3.2.2.1, 18-325, Type 2 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1479,7 +1479,7 @@ typedef struct {
uint32_t max_raw_data_length;
} __attribute__ ((packed)) fwts_acpi_table_hest_nmi_error;
-/* Section 18.3.2.3, Table 18-326, Type 0x06 */
+/* Section 18.3.2.3, Table 18-326, Type 6 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1500,7 +1500,7 @@ typedef struct {
uint32_t root_error_command;
} __attribute__ ((packed)) fwts_acpi_table_hest_pci_express_root_port_aer;
-/* Section 18.3.2.4, Table 18-327, Type 0x07 */
+/* Section 18.3.2.4, Table 18-327, Type 7 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1520,7 +1520,7 @@ typedef struct {
uint32_t advanced_error_capabilities_and_control;
} __attribute__ ((packed)) fwts_acpi_table_hest_pci_express_device_aer;
-/* Section 18.3.2.5, Table 18-328, Type 0x08 */
+/* Section 18.3.2.5, Table 18-328, Type 8 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1543,7 +1543,7 @@ typedef struct {
uint32_t secondary_advanced_error_capabilities_and_control;
} __attribute__ ((packed)) fwts_acpi_table_hest_pci_express_bridge_aer;
-/* Section 18.3.2.6, Table 18-329, Type 0x09 */
+/* Section 18.3.2.6, Table 18-329, Type 9 */
typedef struct {
uint16_t type;
uint16_t source_id;
@@ -1558,7 +1558,7 @@ typedef struct {
uint32_t error_status_block_length;
} __attribute__ ((packed)) fwts_acpi_table_hest_generic_hardware_error_source;
-/* Section 18.3.2.8, Table 18-344, Type 0x0A */
+/* Section 18.3.2.8, Table 18-344, Type 10 */
typedef struct {
uint16_t type;
uint16_t source_id;
--
2.7.4
More information about the fwts-devel
mailing list