Thread (21 messages) flat view 21 messages, 4 authors, 2016-11-29
DORMANTno replies

[PATCH V5 02/10] ras: acpi/apei: cper: generic error data entry v3 per ACPI 6.1

From: Baicar, Tyler <hidden>
Date: 2016-11-29 17:30:02
Also in: kvmarm

On 11/29/2016 4:29 AM, Shiju Jose wrote:
quoted
@@ -451,12 +484,12 @@ void cper_estatus_print(const char *pfx,
  	printk("%s""event severity: %s\n", pfx,
cper_severity_str(severity));
  	data_len = estatus->data_length;
  	gdata = (struct acpi_hest_generic_data *)(estatus + 1);
+
  	snprintf(newpfx, sizeof(newpfx), "%s%s", pfx, INDENT_SP);
-	while (data_len >= sizeof(*gdata)) {
-		gedata_len = gdata->error_data_length;
+
+	while (data_len >= acpi_hest_generic_data_size(gdata)) {
  		cper_estatus_print_section(newpfx, gdata, sec_no);
-		data_len -= gedata_len + sizeof(*gdata);
-		gdata = (void *)(gdata + 1) + gedata_len;
+		gdata = acpi_hest_generic_data_next(gdata);
  		sec_no++;
  	}
  }
Hi Tyler,
Will the above while loop does not come out because data_len is not getting updated as it did in V4 patch?
This is the behaviour seen when we tested on our platform. It worked fine when we update the data_len.
Hello Shiju,

Thank you for testing, and you're right...looks like I got a little too excited at this code simplification. :)
I'll add the data_len update in the next patchset.

Thanks,
Tyler
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help