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-dmar-vtd.h b/sections/cper-section-dmar-vtd.h
index 4f84657..f78b2d1 100644
--- a/sections/cper-section-dmar-vtd.h
+++ b/sections/cper-section-dmar-vtd.h
@@ -4,25 +4,33 @@
#include <json.h>
#include "../edk/Cper.h"
-#define VTD_FAULT_RECORD_TYPES_KEYS (int []){0, 1}
-#define VTD_FAULT_RECORD_TYPES_VALUES (const char*[]){"Write Request", "Read/AtomicOp Request"}
+#define VTD_FAULT_RECORD_TYPES_KEYS \
+ (int[]) \
+ { \
+ 0, 1 \
+ }
+#define VTD_FAULT_RECORD_TYPES_VALUES \
+ (const char *[]) \
+ { \
+ "Write Request", "Read/AtomicOp Request" \
+ }
typedef struct {
- UINT64 Resv1 : 12;
- UINT64 FaultInformation : 52;
- UINT64 SourceIdentifier : 16;
- UINT64 Resv2 : 13;
- UINT64 PrivelegeModeRequested : 1;
- UINT64 ExecutePermissionRequested : 1;
- UINT64 PasidPresent : 1;
- UINT64 FaultReason : 8;
- UINT64 PasidValue : 20;
- UINT64 AddressType : 2;
- UINT64 Type : 1;
- UINT64 Resv3 : 1;
+ UINT64 Resv1 : 12;
+ UINT64 FaultInformation : 52;
+ UINT64 SourceIdentifier : 16;
+ UINT64 Resv2 : 13;
+ UINT64 PrivelegeModeRequested : 1;
+ UINT64 ExecutePermissionRequested : 1;
+ UINT64 PasidPresent : 1;
+ UINT64 FaultReason : 8;
+ UINT64 PasidValue : 20;
+ UINT64 AddressType : 2;
+ UINT64 Type : 1;
+ UINT64 Resv3 : 1;
} EFI_VTD_FAULT_RECORD;
-json_object* cper_section_dmar_vtd_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
-void ir_section_dmar_vtd_to_cper(json_object* section, FILE* out);
+json_object *cper_section_dmar_vtd_to_ir(void *section);
+void ir_section_dmar_vtd_to_cper(json_object *section, FILE *out);
-#endif
\ No newline at end of file
+#endif