]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update Coding style of status code.
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Sep 2006 06:09:01 +0000 (06:09 +0000)
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 4 Sep 2006 06:09:01 +0000 (06:09 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1435 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/StatusCode/Dxe/Common/DxeStatusCodeCommon.c
EdkModulePkg/Universal/StatusCode/Dxe/DataHubStatusCodeWorker.c
EdkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c

index 730a231c0bef0162038d8725eddde99b6e9f87d2..2468078d85cfc67ee8ceaec9f7125d7361c9979e 100644 (file)
@@ -149,7 +149,7 @@ ReportDispatcher (
   // Use atom operation to avoid the reentant of report.\r
   // If current status is not zero, then the function is reentrancy.\r
   //\r
-  if (InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {\r
+  if (1 == InterlockedCompareExchange32 (&gDxeStatusCode.StatusCodeNestStatus, 0, 1)) {\r
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
index 91da14d007eda8fd2b2ac414fce626e12b7ec528..1598397209dc9d666010da4df2c69d90eef15945 100644 (file)
@@ -111,6 +111,7 @@ FreeRecordBuffer (
   @param  Data          This optional parameter may be used to pass additional data\r
  \r
   @retval EFI_OUT_OF_RESOURCES   Can not acquire record buffer.\r
+  @retval EFI_DEVICE_ERROR       EFI serial device can not work after ExitBootService() is called .\r
   @retval EFI_SUCCESS            Success to cache status code and signal log data event.\r
 \r
 **/\r
@@ -133,10 +134,10 @@ DataHubStatusCodeReportWorker (
   // See whether in runtime phase or not.\r
   //\r
   if (EfiAtRuntime ()) {\r
-    return EFI_SUCCESS;\r
+    return EFI_DEVICE_ERROR;\r
   }\r
 \r
-  Record = (DATAHUB_STATUSCODE_RECORD *) AcquireRecordBuffer ();\r
+  Record = AcquireRecordBuffer ();\r
   if (Record == NULL) {\r
     //\r
     // There are no empty record buffer in private buffers\r
index a5dbfa404b31707276a5adbd01a10638347c65f4..b63692a68d1e19add65c30db9e334ebc4a1171ff 100644 (file)
@@ -125,7 +125,7 @@ SerialStatusCodeReportWorker (
                      );\r
     }\r
 \r
-    if (Data) {\r
+    if (Data != NULL) {\r
       CharCount += AsciiSPrint (\r
                      &Buffer[CharCount - 1],\r
                      (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),\r