Re: [PATCH] uuid: Add helpers for finding UUID from an array

From: Andy Shevchenko
Date: Tue Aug 27 2019 - 10:11:27 EST

On Tue, Aug 27, 2019 at 02:49:18PM +0300, Heikki Krogerus wrote:
> Matching function that compares every UUID in an array to a
> given UUID with guid_equal().

> I don't have a user for these helpers, but since they are pretty
> trivial, I figured that might as well propose them in any case.
> Though, I think there was somebody proposing of doing the same thing
> that these helpers do at one point, but just the hard way in the
> drivers, right Andy?

Candidates to use a helper

acpi_is_property_guid(): seems like a candidate
nfit_spa_type(): seems like a candidate

xfs_uuid_unmount(): it looks for dups and holes

lmLogFileSystem(): it looks for holes

Below just users where UUID is a member of structure

visorbus_match() has two deviations: it uses embedded member and according to
code it allows having duplicate UUIDs, though it seems a side effect of not
strictly written code.


...and few more.

With Best Regards,
Andy Shevchenko