lkml.org 
[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] platform/x86: wmi: Switch to use new generic UUID API
On Wed, Aug 30, 2017 at 01:01:28PM -0700, Andy Lutomirski wrote:
> What I'm saying is: I agree that "RFC4122 UUID" and "wintel GUID" are
> different, but the new structs aren't called "RFC4122 UUID" and
> "wintel GUID" - they're called "uuid" and "guid". I think the latter
> is very far from intuitive. I read the wmi patches several times
> before I figured out that they were even potentially correct.

uuid_t is the classic type for the RFC4122 UUID, userspace libuuid
which exists on just about any platforms calls it that, and in
the kernel XFS has been since before uuid_be was introduces. Now
for the Wintel GUID we'd have to call it "GUID" to stay close to
the roots, but I think guid_t is a good enough Linux-ish approximation
for that.

> 1. Make them totally separate. Have a function to convert a string to
> a uuid_le (or a guid_le or whatever you want to call it, as long as
> "le" or perhaps "wintel" is involved so it's obvious.) Have another
> function to convert back. Teach printk to understand %pULE.

They are entirely separate - one uses the uuid_* functions, one uses
guid_* functions.

> 2. Have a function to convert back and forth so that kernel code uses
> the real RFC4122 UUID for internal representations and keep just %pU.

99% of the uses are in interfaces we don't control - on disk, on the
wire, firmware, hypervisor. So there really is no point in converting
between them.

\
 
 \ /
  Last update: 2017-09-01 10:23    [W:0.085 / U:4.840 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site