Formatting .c/.h files and fix memory leakage issues
Signed-off-by: John Chung <john.chung@arm.com>
Change-Id: Id8328f412c2724992d80c0b3f895c8f85bc4ae68
diff --git a/sections/cper-section-cxl-component.h b/sections/cper-section-cxl-component.h
index 21a1374..69b9066 100644
--- a/sections/cper-section-cxl-component.h
+++ b/sections/cper-section-cxl-component.h
@@ -4,32 +4,36 @@
#include <json.h>
#include "../edk/Cper.h"
-#define CXL_COMPONENT_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"deviceIDValid", "deviceSerialValid", \
- "cxlComponentEventLogValid"}
+#define CXL_COMPONENT_ERROR_VALID_BITFIELD_NAMES \
+ (const char *[]) \
+ { \
+ "deviceIDValid", "deviceSerialValid", \
+ "cxlComponentEventLogValid" \
+ }
///
/// CXL Generic Component Error Section
///
typedef struct {
- UINT64 VendorId : 16;
- UINT64 DeviceId : 16;
- UINT64 FunctionNumber : 8;
- UINT64 DeviceNumber : 8;
- UINT64 BusNumber : 8;
- UINT64 SegmentNumber : 16;
- UINT64 Resv1 : 3;
- UINT64 SlotNumber : 13;
- UINT64 Resv2 : 8;
+ UINT64 VendorId : 16;
+ UINT64 DeviceId : 16;
+ UINT64 FunctionNumber : 8;
+ UINT64 DeviceNumber : 8;
+ UINT64 BusNumber : 8;
+ UINT64 SegmentNumber : 16;
+ UINT64 Resv1 : 3;
+ UINT64 SlotNumber : 13;
+ UINT64 Resv2 : 8;
} __attribute__((packed, aligned(1))) EFI_CXL_DEVICE_ID_INFO;
typedef struct {
- UINT32 Length;
- UINT64 ValidBits;
- EFI_CXL_DEVICE_ID_INFO DeviceId;
- UINT64 DeviceSerial;
+ UINT32 Length;
+ UINT64 ValidBits;
+ EFI_CXL_DEVICE_ID_INFO DeviceId;
+ UINT64 DeviceSerial;
} __attribute__((packed, aligned(1))) EFI_CXL_COMPONENT_EVENT_HEADER;
-json_object* cper_section_cxl_component_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
-void ir_section_cxl_component_to_cper(json_object* section, FILE* out);
+json_object *cper_section_cxl_component_to_ir(void *section);
+void ir_section_cxl_component_to_cper(json_object *section, FILE *out);
-#endif
\ No newline at end of file
+#endif