Re: [PATCH v4 1/4] uuid: Add inline helpers to import / export UUIDs

Christoph Hellwig
2020-02-24T17:41:30Z

On Mon, Feb 24, 2020 at 05:37:49PM +0200, Andy Shevchenko wrote:
> Sometimes we may need to import UUID from or export to the raw buffer,
> which is provided outside of kernel and can't be declared as UUID type.
> With current API this operation will require an explicit casting
> to one of UUID types and length, that is always a constant derived as sizeof
> the certain UUID type.
>
> Provide a helpful set of inline helpers to minimize developer's effort
> in the cases when raw buffers are involved.
>
> Suggested-by: David Sterba <dsterba@suse.cz>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

No a huge fan of these trivial memcpy wrappers, but they also don't
seem entirely horrible:

Acked-by: Christoph Hellwig <hch@lst.de>