From patchwork Thu Nov 29 12:31:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 152399 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp2320787ljp; Thu, 29 Nov 2018 04:31:47 -0800 (PST) X-Google-Smtp-Source: AFSGD/XG22oPBI1v0u8ExbZX4hVXoxM1oNfC8oO/f6+wCsXzNdOL262YGDo/9X+WT4Yq37aP0D/t X-Received: by 2002:a63:4c04:: with SMTP id z4mr1106930pga.312.1543494707564; Thu, 29 Nov 2018 04:31:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543494707; cv=none; d=google.com; s=arc-20160816; b=EnS7KZwQFTzoDVLyOnRDbZFxtVm8xWUmfkOKSIDqTuXrDWKBE0I8+9j+77wyxIpN5v ccr38ri8bgLN4CSr6KrP1McDqOEqQDWX4ZxvG5Pkyipbo0fO8wK8d+gJmmh+k3uMN+BD 7rP0FBLznu/dPOmPyQ/zUOTYVpB+Tvjr2+otYwlU/gwfAExE8tutLlQJoQp6UvudGLF4 Ehth3brdT42Q+vRQeQJSh0PQUXBvDDGg/tLAqml2cXV41MvuLtmRjkQmuUA5AIK+h0sb ss+PtLAKe1Iu65pNvk5iJYtEh5rgSdXQvTCSPG4fGIuQayXKbtUd7iz0ilmfBwqw2ANx GUmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=wcdnZWEQcVdfgodxcvp6F0QOQdsdSFpdrqOLz1XUk0o=; b=xMOuf94en9l6anAppAFtBkMLRGhkaOhTK83Y7s9XYYbDC0AzCOT2Ihd+RNB0Fm8M+0 A2ft/I5ZJHCreSbI1B/vY96RvIwKAE2mwnnIxckXyQiHvOtpcayx/YYQnJML8/Vqrk2Q HQi/6HwH0+wv+Or1fW3YDw/QI8HCGs/0Ag7haFogdlomtgkJbQhUoX3108O0ZOUAJHJo 9ZoEiId+fpyjxygAme1yK1CGi/hdwH3LeuLmNgHlK8bnCryWFjRwyPpbuO5sQdwx7Twq wdbR2SQPWo9x43Gg/AC7QQg7ZhM1Mmzzyb8W1CAaRSmBZKXBu+VC0DUAESC/LnA/Ewh4 b+Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZSmMipF0; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id s36si2061427pld.46.2018.11.29.04.31.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 04:31:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZSmMipF0; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D3ECD21BADAB9; Thu, 29 Nov 2018 04:31:41 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::341; helo=mail-wm1-x341.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) (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 B36BD21BADAB9 for ; Thu, 29 Nov 2018 04:31:39 -0800 (PST) Received: by mail-wm1-x341.google.com with SMTP id y1so2066747wmi.3 for ; Thu, 29 Nov 2018 04:31:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c4vWTRxQlB5zBWAMIVBgKE8txScPd41TLF7KfR0J2Qc=; b=ZSmMipF03jZjNf0w335VaYej3wqAdi5PjoEqv72FPoezAqJ3Dx8crFB+cKXTyajD+P YQyTFhONvHazn8zM+ZUuyHJywJlR3OhWPpQTynJ94sfMOXkMUI/ACfAF8znXg5Tzovkf 7Gun9C2v6uSOhfMVpH+NQ+ijAenjJSRXnnqSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c4vWTRxQlB5zBWAMIVBgKE8txScPd41TLF7KfR0J2Qc=; b=fvsjKzNgkOGaY6ma5n7nXsi7cvvjW7pWepV1/zjnvxCXUM7EV2qzzMHZ0OMbEU90qL C5oot4aDEK9G8y5QWp/B5OX1pNphN0/6GqMFowxplp0ejaY7u+hJ93D0o6vMc8hhgPGX TkwMLtfdxVFEelVsIVyXEpbHQ3+Yz3q1pL18LOEGYsp/jEKR0CZyz7p2yA0r3H5E9FbB BQHwuuFcj5aP/7y5/WcVjflEKcYQaPAfpGWmnJt8/I9/yvtJiKazay3NzZyXUToHrV/Q s39xljeI78OFHYAKJXNHoI6xEEYkrvFuY1w4/M3PAF2hZvYvRTJiyowIBcR9Gy77FUBb sH0g== X-Gm-Message-State: AA+aEWYT1mujgCEkAjGkV6K38kgIHjS1qz7LCOdP4uQxDaXkxg0ZKIrP Tb+1773GdU+y9RuFcffy8SzQZBvv/Qk= X-Received: by 2002:a1c:9183:: with SMTP id t125mr1521404wmd.79.1543494697943; Thu, 29 Nov 2018 04:31:37 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:3580:6f80:40a7:5bdd]) by smtp.gmail.com with ESMTPSA id c7sm3089525wre.64.2018.11.29.04.31.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Nov 2018 04:31:37 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 29 Nov 2018 13:31:26 +0100 Message-Id: <20181129123129.25095-4-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181129123129.25095-1-ard.biesheuvel@linaro.org> References: <20181129123129.25095-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [PATCH 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: , Cc: Laszlo Ersek , Liming Gao Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- BaseTools/Source/C/DevicePath/DevicePathFromText.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.19.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Jaben Carsey 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;