lkml.org 
[lkml]   [2017]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] platform/x86: wmi: Switch to use new generic UUID API
On Sun, Aug 13, 2017 at 7:13 AM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> There are new types and helpers that are supposed to be used in new code.
>
> As a preparation to get rid of legacy types and API functions do
> the conversion here.
>
> While here, update Copyright to reflect this change along with previous
> one for the topic.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

>
> - if (memcmp(block->gblock.guid, &guid_input, 16) == 0) {
> + if (guid_equal((guid_t *)&block->gblock.guid, &guid_input)) {

As discussed in the other email, NAK.

This line should read:

if (uuid_le_equal(...))

or

if (uuid_le_equal_uuid(...))

or similar. Barring that, I think memcmp() is far better than the
obviously-wrong-but-actually-secretly-correct guid_equal().

--Andy

\
 
 \ /
  Last update: 2017-08-13 17:37    [W:0.058 / U:0.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site