From: "Bi, Dandan" <dandan.bi@intel.com>
To: "Wang, Fan" <fan.wang@intel.com>,
"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout
Date: Mon, 25 Dec 2017 05:48:40 +0000 [thread overview]
Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3B9F065D@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1514169946-6992-1-git-send-email-fan.wang@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Thanks,
Dandan
-----Original Message-----
From: Wang, Fan
Sent: Monday, December 25, 2017 10:46 AM
To: edk2-devel@lists.01.org
Cc: Wang, Fan <fan.wang@intel.com>; Bi, Dandan <dandan.bi@intel.com>
Subject: [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout
From: Wang Fan <fan.wang@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
---
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/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.
**/
-
EFI_STATUS
EFIAPI
NetLibDetectMediaWaitTimeout (
IN EFI_HANDLE ServiceHandle,
IN UINT64 Timeout,
@@ -2571,11 +2570,11 @@ NetLibDetectMediaWaitTimeout (
if (EFI_ERROR (Status)) {
MediaPresent = TRUE;
Status = NetLibDetectMedia (ServiceHandle, &MediaPresent);
if (!EFI_ERROR (Status)) {
- if (MediaPresent == TRUE) {
+ if (MediaPresent) {
*MediaState = EFI_SUCCESS;
} else {
*MediaState = EFI_NO_MEDIA;
}
}
@@ -2612,11 +2611,11 @@ NetLibDetectMediaWaitTimeout (
// If gEfiAdapterInfoMediaStateGuid is not supported, call NetLibDetectMedia to get media state!
//
MediaPresent = TRUE;
Status = NetLibDetectMedia (ServiceHandle, &MediaPresent);
if (!EFI_ERROR (Status)) {
- if (MediaPresent == TRUE) {
+ if (MediaPresent) {
*MediaState = EFI_SUCCESS;
} else {
*MediaState = EFI_NO_MEDIA;
}
}
--
1.9.5.msysgit.1
prev parent reply other threads:[~2017-12-25 5:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-25 2:45 [Patch] MdeModulePkg/NetLib: Refine coding style for API NetLibDetectMediaWaitTimeout fanwang2
2017-12-25 5:48 ` Bi, Dandan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C0D5C461C9E904E8F62152F6274C0BB3B9F065D@SHSMSX103.ccr.corp.intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox