From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.24; helo=mga09.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 40F0321CB87AF for ; Sun, 24 Dec 2017 21:43:50 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2017 21:48:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,453,1508828400"; d="scan'208";a="18743654" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 24 Dec 2017 21:48:42 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 24 Dec 2017 21:48:42 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Mon, 25 Dec 2017 13:48:40 +0800 From: "Bi, Dandan" To: "Wang, Fan" , "edk2-devel@lists.01.org" Thread-Topic: [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout Thread-Index: AQHTfSqAiNQig5G8mkWCLT9vBl+2taNTjSgQ Date: Mon, 25 Dec 2017 05:48:40 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B9F065D@SHSMSX103.ccr.corp.intel.com> References: <1514169946-6992-1-git-send-email-fan.wang@intel.com> In-Reply-To: <1514169946-6992-1-git-send-email-fan.wang@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/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Dec 2017 05:43:50 -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: Wang, Fan=20 Sent: Monday, December 25, 2017 10:46 AM To: edk2-devel@lists.01.org Cc: Wang, Fan ; Bi, Dandan Subject: [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDet= ectMediaWaitTimeout From: Wang Fan Cc: Dandan Bi Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan --- MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Libr= ary/DxeNetLib/DxeNetLib.c index d75cca2..26a80a7 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -2526,11 +2526,10 @@ Exit: MediaState pointer is NULL. @retval EFI_DEVICE_ERROR A device error occurred. @retval EFI_TIMEOUT Network is connecting but timeout. =20 **/ - EFI_STATUS EFIAPI NetLibDetectMediaWaitTimeout ( IN EFI_HANDLE ServiceHandle, IN UINT64 Timeout, @@ -2571,11 +2570,11 @@ NetLibDetectMediaWaitTimeout ( if (EFI_ERROR (Status)) { =20 MediaPresent =3D TRUE; Status =3D NetLibDetectMedia (ServiceHandle, &MediaPresent); if (!EFI_ERROR (Status)) { - if (MediaPresent =3D=3D TRUE) { + if (MediaPresent) { *MediaState =3D EFI_SUCCESS; } else { *MediaState =3D EFI_NO_MEDIA; } } @@ -2612,11 +2611,11 @@ NetLibDetectMediaWaitTimeout ( // If gEfiAdapterInfoMediaStateGuid is not supported, call NetLibDet= ectMedia to get media state! // MediaPresent =3D TRUE; Status =3D NetLibDetectMedia (ServiceHandle, &MediaPresent); if (!EFI_ERROR (Status)) { - if (MediaPresent =3D=3D TRUE) { + if (MediaPresent) { *MediaState =3D EFI_SUCCESS; } else { *MediaState =3D EFI_NO_MEDIA; } } --=20 1.9.5.msysgit.1