From ccbbb4b1c5bd039673c783eec281bd52a2407ffd Mon Sep 17 00:00:00 2001 From: Rebecca Cran Date: Thu, 6 Apr 2023 13:50:52 -0600 Subject: EmbeddedPkg: Update code to be more C11 compliant by using __func__ __FUNCTION__ is a pre-standard extension that gcc and Visual C++ among others support, while __func__ was standardized in C99. Since it's more standard, replace __FUNCTION__ with __func__ throughout EmbeddedPkg. Signed-off-by: Rebecca Cran Reviewed-by: Michael D Kinney Reviewed-by: Ard Biesheuvel Reviewed-by: Abner Chang --- EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'EmbeddedPkg/Universal') diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c index 86eb55800e..57388d9f46 100755 --- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c @@ -414,13 +414,13 @@ InitializeSdMmcDevice ( Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __func__, Status)); return Status; } Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __func__, Status)); return Status; } @@ -473,18 +473,18 @@ InitializeSdMmcDevice ( CmdArg = CreateSwitchCmdArgument (0, 0, 0); Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __func__, Status)); return Status; } else { Status = MmcHost->ReadBlockData (MmcHost, 0, SWITCH_CMD_DATA_LENGTH, Buffer); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Status = %r\n", __func__, Status)); return Status; } } if (!(Buffer[3] & SD_HIGH_SPEED_SUPPORTED)) { - DEBUG ((DEBUG_INFO, "%a : High Speed not supported by Card\n", __FUNCTION__)); + DEBUG ((DEBUG_INFO, "%a : High Speed not supported by Card\n", __func__)); } else { Speed = SD_HIGH_SPEED; @@ -492,12 +492,12 @@ InitializeSdMmcDevice ( CmdArg = CreateSwitchCmdArgument (1, 0, 1); Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __func__, Status)); return Status; } else { Status = MmcHost->ReadBlockData (MmcHost, 0, SWITCH_CMD_DATA_LENGTH, Buffer); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): ReadBlockData Error and Status = %r\n", __func__, Status)); return Status; } @@ -513,14 +513,14 @@ InitializeSdMmcDevice ( CmdArg = MmcHostInstance->CardInfo.RCA << 16; Status = MmcHost->SendCommand (MmcHost, MMC_CMD55, CmdArg); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD55): Error and Status = %r\n", __func__, Status)); return Status; } /* Width: 4 */ Status = MmcHost->SendCommand (MmcHost, MMC_CMD6, 2); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (MMC_CMD6): Error and Status = %r\n", __func__, Status)); return Status; } } @@ -528,7 +528,7 @@ InitializeSdMmcDevice ( if (MMC_HOST_HAS_SETIOS (MmcHost)) { Status = MmcHost->SetIos (MmcHost, Speed, BUSWIDTH_4, EMMCBACKWARD); if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "%a (SetIos): Error and Status = %r\n", __FUNCTION__, Status)); + DEBUG ((DEBUG_ERROR, "%a (SetIos): Error and Status = %r\n", __func__, Status)); return Status; } } -- cgit v1.2.3