From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.43; helo=mga05.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 22E71210D7F38 for ; Mon, 2 Jul 2018 17:51:58 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Jul 2018 17:51:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,301,1526367600"; d="scan'208";a="237372815" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga005.jf.intel.com with ESMTP; 02 Jul 2018 17:51:47 -0700 Received: from FMSMSX109.amr.corp.intel.com (10.18.116.9) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 2 Jul 2018 17:51:47 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx109.amr.corp.intel.com (10.18.116.9) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 2 Jul 2018 17:51:46 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.223]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.51]) with mapi id 14.03.0319.002; Tue, 3 Jul 2018 08:51:45 +0800 From: "Bi, Dandan" To: "Zeng, Star" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" , "Zeng, Star" Thread-Topic: [edk2] [PATCH] MdeModulePkg SataControllerDxe: Use compare logic in if condition Thread-Index: AQHUEekDz7IdvtpvQEehIDI0wENyU6R8rB2Q Date: Tue, 3 Jul 2018 00:51:44 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BB3042F@shsmsx102.ccr.corp.intel.com> References: <1530524539-195620-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1530524539-195620-1-git-send-email-star.zeng@intel.com> Accept-Language: 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 SataControllerDxe: Use compare logic in if condition X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jul 2018 00:51:58 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Dandan Bi Thanks, Dandan -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Star= Zeng Sent: Monday, July 2, 2018 5:42 PM To: edk2-devel@lists.01.org Cc: Wu, Hao A ; Bi, Dandan ; Zeng,= Star Subject: [edk2] [PATCH] MdeModulePkg SataControllerDxe: Use compare logic i= n if condition Use compare logic in if condition to fix ECC issue. It is caused by aa4240edff41034d709938a15b42cf4fd3214386. Cc: Hao Wu Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng --- MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c b/MdeM= odulePkg/Bus/Pci/SataControllerDxe/SataController.c index d47e918f5757..d3af4c626ef5 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c @@ -483,7 +483,7 @@ SataControllerStart ( } MaxPortNumber =3D 31; while (MaxPortNumber > 0) { - if (Data32 & (1 << MaxPortNumber)) { + if ((Data32 & (UINT32) (1 << MaxPortNumber)) !=3D 0) { break; } MaxPortNumber--; --=20 2.7.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel