The location_fields is used for both APEI and DSM data.
The logic there defines 7 values for APEI and 9 for DSM,
but, with the current logic, it allocates only 7 elements.
This is likely due to a typo. Fix it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
DSM_FIELD_NUM
};
-#define APEI_FIELD_NUM_CONST (int)APEI_FIELD_NUM
-#define DSM_FIELD_NUM_CONST (int)DSM_FIELD_NUM
+#define APEI_FIELD_NUM_CONST ((int)APEI_FIELD_NUM)
+#define DSM_FIELD_NUM_CONST ((int)DSM_FIELD_NUM)
struct memory_location_field {
const char *name;
time_t start;
};
-#define ROW_LOCATION_FIELDS_NUM (DSM_FIELD_NUM_CONST > DSM_FIELD_NUM_CONST ? DSM_FIELD_NUM_CONST : APEI_FIELD_NUM_CONST)
+#define ROW_LOCATION_FIELDS_NUM ((DSM_FIELD_NUM_CONST > APEI_FIELD_NUM_CONST ? \
+ DSM_FIELD_NUM_CONST : APEI_FIELD_NUM_CONST))
+
struct row_record {
LIST_ENTRY(row_record) entry;
LIST_HEAD(page_listhead, page_addr) page_head;