On Tue, 17 Nov 2026 12:10:14 +0100 Pierre Gondois <[email protected]> wrote:
> When a status block contains multiple sections, a section without valid > FRU fields inherits pointers from the preceding section. Perhaps rewrite that so it is clear you are referring to the implementation of the parser not spec requirement for it to get them from previous section. That had me briefly confused - I even wondered why I'd never noticed that requirement :) > > Use empty fru_id and fru_text values whenever the matching VALID > bit is not set instead of reusing the value of the previous loop. > > Signed-off-by: Pierre Gondois <[email protected]> Fixes tag seems appropriate for this one given it may be reporting confusing or invalid data today. Probably not a thing to rush into stable but nice to tag it anyway. With that small reword above. Reviewed-by: Jonathan Cameron <[email protected]> > --- > drivers/acpi/apei/ghes.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c > index 703f3b7f700a6..444d8e82353a7 100644 > --- a/drivers/acpi/apei/ghes.c > +++ b/drivers/acpi/apei/ghes.c > @@ -979,8 +979,8 @@ static void ghes_do_proc(struct ghes *ghes, > int sev, sec_sev; > struct acpi_hest_generic_data *gdata; > guid_t *sec_type; > - const guid_t *fru_id = &guid_null; > - char *fru_text = ""; > + const guid_t *fru_id; > + const char *fru_text; > bool queued = false; > bool sync = is_hest_sync_notify(ghes); > > @@ -990,9 +990,13 @@ static void ghes_do_proc(struct ghes *ghes, > sec_sev = ghes_severity(gdata->error_severity); > if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID) > fru_id = (guid_t *)gdata->fru_id; > + else > + fru_id = &guid_null; > > if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT) > fru_text = gdata->fru_text; > + else > + fru_text = ""; > > ghes_log_hwerr(sev, sec_type); > if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
