Re: [PATCH v1 05/10] ACPI: switch to use generic UUID API

From: Andy Shevchenko
Date: Fri Feb 26 2016 - 08:45:59 EST


On Wed, 2016-02-17 at 09:49 -0800, Dan Williams wrote:
> On Wed, Feb 17, 2016 at 4:17 AM, Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > Instead of opencoding the existing library functions let's use them
> > directly.
> >
> > The conversion fixes a potential bug in int340x_thermal as well
> > since we have
> > to use memcmp() on binary data.

[..]

> > +ÂÂÂÂÂÂÂuuid_le_to_bin(UUID_NFIT_BUS, &nfit_uuid[NFIT_DEV_BUS]);
> > +ÂÂÂÂÂÂÂuuid_le_to_bin(UUID_NFIT_DIMM, &nfit_uuid[NFIT_DEV_DIMM]);
>
> I don't see the benefit of this change.

The benefit is to have less places (ideally one) which provides UUID
helper routines for kernel.

> ÂÂFor the NFIT driver we went
> through a fire drill trying to make sure the ACPI spec format of a
> UUID matched the Linux interpretation, and this change makes that
> harder to determine.ÂÂ

How harder? At least you look into one place and see exactly all
functions related. Besides this series actually uses the same approach
that was used in ACPI.

> ACPI drivers should use ACPICA uuid helper
> routines in my opinion.

As far as I can see ACPICA lacks of needed API.

--
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
Intel Finland Oy