From: "Bjørn Mork" <bjorn@mork.no>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Kui Zhang <kuizhang@gmail.com>,
Darren Hart <dvhart@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: WMI driver no longer load after switching to generic UUID library
Date: Mon, 30 May 2016 12:52:14 +0200 [thread overview]
Message-ID: <87y46ru8bl.fsf@nemi.mork.no> (raw)
In-Reply-To: <1464595081.27624.48.camel@linux.intel.com> (Andy Shevchenko's message of "Mon, 30 May 2016 10:58:01 +0300")
[-- Attachment #1: Type: text/plain, Size: 54 bytes --]
How about the untested attached patch?
Bjørn
[-- Attachment #2: 0001-lib-uuid.c-use-correct-offset-in-uuid-parser.patch --]
[-- Type: text/x-diff, Size: 1097 bytes --]
>From d1682d6c0a558cf8ffb82af959156f99f0f1f61a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bjorn@mork.no>
Date: Mon, 30 May 2016 12:44:05 +0200
Subject: [PATCH] lib/uuid.c: use correct offset in uuid parser
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Use '+ 0' and '+ 1' as offsets, like they were intended, instead
of adding to the result.
Fixes: 2b1b0d66704a ("lib/uuid.c: introduce a few more generic helpers")
Signed-off-by: Bjørn Mork <bjorn@mork.no>
---
lib/uuid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/uuid.c b/lib/uuid.c
index e116ae5fa00f..37687af77ff8 100644
--- a/lib/uuid.c
+++ b/lib/uuid.c
@@ -106,8 +106,8 @@ static int __uuid_to_bin(const char *uuid, __u8 b[16], const u8 ei[16])
return -EINVAL;
for (i = 0; i < 16; i++) {
- int hi = hex_to_bin(uuid[si[i]] + 0);
- int lo = hex_to_bin(uuid[si[i]] + 1);
+ int hi = hex_to_bin(uuid[si[i] + 0]);
+ int lo = hex_to_bin(uuid[si[i] + 1]);
b[ei[i]] = (hi << 4) | lo;
}
--
2.1.4
next prev parent reply other threads:[~2016-05-30 10:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAKx2Y1n0e+ggDcaqr8KD=3XLngzxQDRFDKdj=JPrqK0aiMxCpA@mail.gmail.com>
2016-05-29 18:37 ` Fwd: " Kui Zhang
2016-05-29 20:22 ` Linus Torvalds
2016-05-30 7:58 ` Andy Shevchenko
2016-05-30 10:52 ` Bjørn Mork [this message]
2016-05-30 14:40 ` Andy Shevchenko
2016-05-31 4:18 ` Kui Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y46ru8bl.fsf@nemi.mork.no \
--to=bjorn@mork.no \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dvhart@linux.intel.com \
--cc=kuizhang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®