Re: [PATCH 6/7] acpi: Create subtable parsing infrastructure

From: Keith Busch
Date: Mon Nov 19 2018 - 13:39:32 EST


On Mon, Nov 19, 2018 at 10:58:12AM +0100, Rafael J. Wysocki wrote:
> > +static unsigned long __init
> > +acpi_get_entry_length(struct acpi_subtable_entry *entry)
> > +{
> > + switch (entry->type) {
> > + case ACPI_SUBTABLE_COMMON:
> > + return entry->hdr->common.length;
> > + }
> > + WARN_ONCE(1, "invalid acpi type\n");
>
> AFAICS this does a WARN_ONCE() on information obtained from firmware.
>
> That is not a kernel problem, so generating traces in that case is not
> a good idea IMO. Moreover, users can't really do much about this in
> the majority of cases, so a pr_info() message should be sufficient.

Sure thing, I'll fix that up for the next revision.