From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C458981B56 for ; Tue, 10 Jan 2017 23:27:40 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP; 10 Jan 2017 23:27:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,345,1477983600"; d="scan'208";a="47718798" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga004.jf.intel.com with ESMTP; 10 Jan 2017 23:27:33 -0800 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 23:27:33 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 10 Jan 2017 23:27:32 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.177]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Wed, 11 Jan 2017 15:27:28 +0800 From: "Tian, Feng" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Zeng, Star" , "Kinney, Michael D" , "Tian, Feng" Thread-Topic: [PATCH] MdeModulePkg/Stall: Refine to compare 2 values with the same type Thread-Index: AQHSZ/otLr22rwLSV0qtI8OSgMWpJqEy6E/A Date: Wed, 11 Jan 2017 07:27:28 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE5699A880C@SHSMSX101.ccr.corp.intel.com> References: <1483692724-30128-1-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1483692724-30128-1-git-send-email-hao.a.wu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/Stall: Refine to compare 2 values with the same type X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2017 07:27:40 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Feng Tian Thanks Feng -----Original Message----- From: Wu, Hao A=20 Sent: Friday, January 6, 2017 4:52 PM To: edk2-devel@lists.01.org Cc: Wu, Hao A ; Tian, Feng ; Zeng,= Star ; Kinney, Michael D Subject: [PATCH] MdeModulePkg/Stall: Refine to compare 2 values with the sa= me type Cc: Feng Tian Cc: Star Zeng Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- MdeModulePkg/Core/Dxe/Misc/Stall.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/Misc/Stall.c b/MdeModulePkg/Core/Dxe/Mis= c/Stall.c index 73e9078..95a5615 100644 --- a/MdeModulePkg/Core/Dxe/Misc/Stall.c +++ b/MdeModulePkg/Core/Dxe/Misc/Stall.c @@ -1,7 +1,7 @@ /** @file UEFI Miscellaneous boot Services Stall service implementation =20 -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made availab= le under the terms and conditions of the BSD License which accompanies thi= s distribution. The full text of the license may be found at @@ -67,7 +67,= 7 @@ CoreStall ( // Counter =3D Microseconds * 10 / gMetronome->TickPeriod // 0x1999999999999999 =3D (2^64 - 1) / 10 // - if (Microseconds > 0x1999999999999999ULL) { + if ((UINT64) Microseconds > 0x1999999999999999ULL) { // // Microseconds is too large to multiple by 10 first. Perform the div= ide=20 // operation first and loop 10 times to avoid 64-bit math overflow. -- 1.9.5.msysgit.0