summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-04 06:09:01 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-09-04 06:09:01 +0000
commitafaa1b87a4f1322491edd545500510b595254eab (patch)
tree7c5e2ebe31eb60facda93516b512ddd7aabbbcf3 /EdkModulePkg/Universal
parentabce9cbd99ef521ec601e2525bc3c92113567c3c (diff)
downloadedk2-platforms-afaa1b87a4f1322491edd545500510b595254eab.tar.xz
Update Coding style of status code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1435 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal')
-rw-r--r--EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c2
-rw-r--r--EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c5
-rw-r--r--EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c b/EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c
index 730a231c0b..2468078d85 100644
--- a/EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c
+++ b/EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c
@@ -149,7 +149,7 @@ ReportDispatcher (
// Use atom operation to avoid the reentant of report.
// If current status is not zero, then the function is reentrancy.
//
- if (InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {
+ if (1 == InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {
return EFI_DEVICE_ERROR;
}
diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c
index 91da14d007..1598397209 100644
--- a/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c
+++ b/EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c
@@ -111,6 +111,7 @@ FreeRecordBuffer (
@param Data This optional parameter may be used to pass additional data
@retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.
+ @retval EFI_DEVICE_ERROR EFI serial device can not work after ExitBootService() is called .
@retval EFI_SUCCESS Success to cache status code and signal log data event.
**/
@@ -133,10 +134,10 @@ DataHubStatusCodeReportWorker (
// See whether in runtime phase or not.
//
if (EfiAtRuntime ()) {
- return EFI_SUCCESS;
+ return EFI_DEVICE_ERROR;
}
- Record = (DATAHUB_STATUSCODE_RECORD *) AcquireRecordBuffer ();
+ Record = AcquireRecordBuffer ();
if (Record == NULL) {
//
// There are no empty record buffer in private buffers
diff --git a/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
index a5dbfa404b..b63692a68d 100644
--- a/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
+++ b/EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
@@ -125,7 +125,7 @@ SerialStatusCodeReportWorker (
);
}
- if (Data) {
+ if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
(EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),