On Mon, Mar 30, 2020 at 05:12:58PM -0600, Simon Glass wrote:
> A device may want to write out ACPI tables to describe itself to Linux.
> Add a method to permit this.

> +acpi_method acpi_get_method(struct udevice *dev, enum method_t method)
> +{
> +     struct acpi_ops *aops;
> +
> +     aops = device_get_acpi_ops(dev);
> +     if (aops) {
> +             switch (method) {
> +             case METHOD_WRITE_TABLES:
> +                     return aops->write_tables;
> +             }

Where is default?

> +     }
> +
> +     return NULL;

Perhaps,

        if (!aops)
                return NULL;

        switch (method) {
                ...
        default:
                return NULL;
        }

> +}

...

> +             log_debug("\n- %s %p\n", parent->name, func);

Leading '\n' in the messages is not good idea.
It might work nicely in U-Boot, but in general better to avoid.


-- 
With Best Regards,
Andy Shevchenko


Reply via email to