]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MMC : Added missing __FUNCTION__ macro.
authorMeenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Thu, 7 Sep 2017 14:17:52 +0000 (19:47 +0530)
committerLeif Lindholm <leif.lindholm@linaro.org>
Thu, 7 Sep 2017 16:06:39 +0000 (17:06 +0100)
We want to print name of the function resulted in error,
but __FUNCTION__ macro was missing.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@nxp.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c

index 7f74c54696a632382c82f376784b5cdd6318a16d..27e4444844e64ceab6ef71e95c41dfd471ccaa75 100644 (file)
@@ -388,12 +388,12 @@ InitializeSdMmcDevice (
 \r
   Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg);\r
   if (EFI_ERROR (Status)) {\r
 \r
   Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a(MMC_CMD55): Error and Status = %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __FUNCTION__, Status));\r
     return Status;\r
   }\r
   Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response);\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
   }\r
   Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response);\r
   if (EFI_ERROR (Status)) {\r
-    DEBUG ((EFI_D_ERROR, "%a(MMC_CMD55): Error and Status = %r\n", Status));\r
+    DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __FUNCTION__, Status));\r
     return Status;\r
   }\r
   if ((Response[0] & MMC_STATUS_APP_CMD) == 0) {\r
     return Status;\r
   }\r
   if ((Response[0] & MMC_STATUS_APP_CMD) == 0) {\r
@@ -445,12 +445,12 @@ InitializeSdMmcDevice (
     CmdArg |= 1 << (0 * 4);\r
     Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg);\r
     if (EFI_ERROR (Status)) {\r
     CmdArg |= 1 << (0 * 4);\r
     Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a(MMC_CMD6): Error and Status = %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status));\r
        return Status;\r
     } else {\r
       Status = MmcHost->ReadBlockData (MmcHost, 0, 64, Buffer);\r
       if (EFI_ERROR (Status)) {\r
        return Status;\r
     } else {\r
       Status = MmcHost->ReadBlockData (MmcHost, 0, 64, Buffer);\r
       if (EFI_ERROR (Status)) {\r
-        DEBUG ((EFI_D_ERROR, "%a(MMC_CMD6): ReadBlockData Error and Status = %r\n", Status));\r
+        DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Status = %r\n", __FUNCTION__, Status));\r
         return Status;\r
       }\r
     }\r
         return Status;\r
       }\r
     }\r
@@ -459,20 +459,20 @@ InitializeSdMmcDevice (
     CmdArg = MmcHostInstance->CardInfo.RCA << 16;\r
     Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg);\r
     if (EFI_ERROR (Status)) {\r
     CmdArg = MmcHostInstance->CardInfo.RCA << 16;\r
     Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a(MMC_CMD55): Error and Status = %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __FUNCTION__, Status));\r
       return Status;\r
     }\r
     /* Width: 4 */\r
     Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, 2);\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
     /* Width: 4 */\r
     Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, 2);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a(MMC_CMD6): Error and Status = %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status));\r
       return Status;\r
     }\r
   }\r
   if (MMC_HOST_HAS_SETIOS(MmcHost)) {\r
     Status = MmcHost->SetIos (MmcHost, 26 * 1000 * 1000, 4, EMMCBACKWARD);\r
     if (EFI_ERROR (Status)) {\r
       return Status;\r
     }\r
   }\r
   if (MMC_HOST_HAS_SETIOS(MmcHost)) {\r
     Status = MmcHost->SetIos (MmcHost, 26 * 1000 * 1000, 4, EMMCBACKWARD);\r
     if (EFI_ERROR (Status)) {\r
-      DEBUG ((EFI_D_ERROR, "%a(SetIos): Error and Status = %r\n", Status));\r
+      DEBUG ((DEBUG_ERROR, "%a (SetIos): Error and Status = %r\n", __FUNCTION__, Status));\r
       return Status;\r
     }\r
   }\r
       return Status;\r
     }\r
   }\r