From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.85.128.66; helo=mail-wm1-f66.google.com; envelope-from=philmd@redhat.com; receiver=edk2-devel@lists.01.org Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 5F075211982CF for ; Mon, 3 Dec 2018 02:25:54 -0800 (PST) Received: by mail-wm1-f66.google.com with SMTP id r24so6605912wmh.0 for ; Mon, 03 Dec 2018 02:25:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=WT4Zs/lX0I8UPz+UFO9+FYDgGIQnaZ391Yjm9QZ+Np4=; b=g+5CTi6rgMnSlHBbdCepe7CqRhBZQUQOgPNjzZoOx6QJKXYqut2jFWeNkrjArcX70v 1Mr3Fua9ypmLlJ8QENEZB3CDtEIBkyEQionVROiE2NfrzsTp1AxQ4S1Gx1m19ABpWK0m rqK1fJLNy2Gqr05p1+maZrDl5BJ/phm4QgnyzrJ5cMg0Jie4+UvrB3rRAbPixYxA/TMp JPVKCHWXP2h8QbjzCH5gJMBuw1Zs1kpm/A/B4yCBsAKBsewD51DIsFgIbRQ8BrAyduBi 4BWbiYg5C7H1xHL3hJJGV2Wi48vsy4afeszblzSiynuvZseTVCbVroHugebQ5+W/42XI izkw== X-Gm-Message-State: AA+aEWbhWqhA7p28vSZb87jz0tGTGWAycX/NqCigB3YvWfyn2Gl6SkeG AIr8vyzN5qYbQdkfBeqeG6QL8A== X-Google-Smtp-Source: AFSGD/X2ABoonVrRfihfKaTHqlLWR6JhG5JeALVwqjmOhCEpGbxeohkA4eH287JSPOIiRWkpFxvPEw== X-Received: by 2002:a1c:b456:: with SMTP id d83mr8153352wmf.115.1543832752932; Mon, 03 Dec 2018 02:25:52 -0800 (PST) Received: from ?IPv6:2a01:cb1d:8a0a:f500:48c1:8eab:256a:caf9? ([2a01:cb1d:8a0a:f500:48c1:8eab:256a:caf9]) by smtp.gmail.com with ESMTPSA id b18sm12009406wrw.83.2018.12.03.02.25.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 02:25:52 -0800 (PST) To: Ard Biesheuvel , edk2-devel@lists.01.org Cc: Liming Gao , Jaben Carsey , Laszlo Ersek References: <20181130224537.18936-1-ard.biesheuvel@linaro.org> <20181130224537.18936-4-ard.biesheuvel@linaro.org> From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <14a5c3de-7a4c-a992-f3cc-450276b6c91f@redhat.com> Date: Mon, 3 Dec 2018 11:25:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20181130224537.18936-4-ard.biesheuvel@linaro.org> Subject: Re: [PATCH v2 3/6] BaseTools/DevicePath: use explicit 64-bit number parsing routines X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Dec 2018 10:25:54 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 30/11/18 23:45, Ard Biesheuvel wrote: > Replace invocations of StrHexToUintn() with StrHexToUint64(), so > that we can drop the former. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ard Biesheuvel > Reviewed-by: Jaben Carsey Reviewed-by: Philippe Mathieu-Daudé > --- > BaseTools/Source/C/DevicePath/DevicePathFromText.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/BaseTools/Source/C/DevicePath/DevicePathFromText.c b/BaseTools/Source/C/DevicePath/DevicePathFromText.c > index 555efa1acdde..6151926af9aa 100644 > --- a/BaseTools/Source/C/DevicePath/DevicePathFromText.c > +++ b/BaseTools/Source/C/DevicePath/DevicePathFromText.c > @@ -520,7 +520,7 @@ EisaIdFromText ( > return (((Text[0] - 'A' + 1) & 0x1f) << 10) > + (((Text[1] - 'A' + 1) & 0x1f) << 5) > + (((Text[2] - 'A' + 1) & 0x1f) << 0) > - + (UINT32) (StrHexToUintn (&Text[3]) << 16) > + + (UINT32) (StrHexToUint64 (&Text[3]) << 16) > ; > } > > @@ -1506,7 +1506,7 @@ DevPathFromTextNVMe ( > > Index = sizeof (Nvme->NamespaceUuid) / sizeof (UINT8); > while (Index-- != 0) { > - Uuid[Index] = (UINT8) StrHexToUintn (SplitStr (&NamespaceUuidStr, L'-')); > + Uuid[Index] = (UINT8) StrHexToUint64 (SplitStr (&NamespaceUuidStr, L'-')); > } > > return (EFI_DEVICE_PATH_PROTOCOL *) Nvme; >