diff options
author | Rebecca Cran <rebecca@bsdio.com> | 2023-04-06 13:49:41 -0600 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-04-10 14:19:57 +0000 |
commit | 8ba392687b6f7fcb6e333756edd090003c57402e (patch) | |
tree | 040194cbfaa73f764e86e050e9bc00b58e4fc60b /OvmfPkg/SmmControl2Dxe | |
parent | 089013a69724687f4051fc88367c9eb74def4284 (diff) | |
download | edk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.gz edk2-8ba392687b6f7fcb6e333756edd090003c57402e.tar.bz2 edk2-8ba392687b6f7fcb6e333756edd090003c57402e.zip |
OvmfPkg: 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
OvmfPkg.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
Diffstat (limited to 'OvmfPkg/SmmControl2Dxe')
-rw-r--r-- | OvmfPkg/SmmControl2Dxe/SmiFeatures.c | 22 | ||||
-rw-r--r-- | OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c | 18 |
2 files changed, 20 insertions, 20 deletions
diff --git a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c index daeb7195ae..4bd24bf119 100644 --- a/OvmfPkg/SmmControl2Dxe/SmiFeatures.c +++ b/OvmfPkg/SmmControl2Dxe/SmiFeatures.c @@ -113,7 +113,7 @@ NegotiateSmiFeatures ( DEBUG ((
DEBUG_INFO,
"%a: SMI feature negotiation unavailable\n",
- __FUNCTION__
+ __func__
));
return FALSE;
}
@@ -129,7 +129,7 @@ NegotiateSmiFeatures ( DEBUG ((
DEBUG_ERROR,
"%a: size mismatch in feature negotiation\n",
- __FUNCTION__
+ __func__
));
goto FatalError;
}
@@ -168,7 +168,7 @@ NegotiateSmiFeatures ( DEBUG ((
DEBUG_ERROR,
"%a: negotiation failed for feature bitmap 0x%Lx\n",
- __FUNCTION__,
+ __func__,
mSmiFeatures
));
goto FatalError;
@@ -179,7 +179,7 @@ NegotiateSmiFeatures ( // If we can't get broadcast SMIs from QEMU, that's acceptable too,
// although not optimal.
//
- DEBUG ((DEBUG_INFO, "%a: SMI broadcast unavailable\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: SMI broadcast unavailable\n", __func__));
} else {
//
// Configure the traditional AP sync / SMI delivery mode for
@@ -192,31 +192,31 @@ NegotiateSmiFeatures ( DEBUG ((
DEBUG_ERROR,
"%a: PiSmmCpuDxeSmm PCD configuration failed\n",
- __FUNCTION__
+ __func__
));
goto FatalError;
}
- DEBUG ((DEBUG_INFO, "%a: using SMI broadcast\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: using SMI broadcast\n", __func__));
}
if ((mSmiFeatures & ICH9_LPC_SMI_F_CPU_HOTPLUG) == 0) {
- DEBUG ((DEBUG_INFO, "%a: CPU hotplug not negotiated\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: CPU hotplug not negotiated\n", __func__));
} else {
DEBUG ((
DEBUG_INFO,
"%a: CPU hotplug with SMI negotiated\n",
- __FUNCTION__
+ __func__
));
}
if ((mSmiFeatures & ICH9_LPC_SMI_F_CPU_HOT_UNPLUG) == 0) {
- DEBUG ((DEBUG_INFO, "%a: CPU hot-unplug not negotiated\n", __FUNCTION__));
+ DEBUG ((DEBUG_INFO, "%a: CPU hot-unplug not negotiated\n", __func__));
} else {
DEBUG ((
DEBUG_INFO,
"%a: CPU hot-unplug with SMI negotiated\n",
- __FUNCTION__
+ __func__
));
}
@@ -292,7 +292,7 @@ AppendFwCfgBootScript ( DEBUG ((
DEBUG_VERBOSE,
"%a: SMI feature negotiation boot script saved\n",
- __FUNCTION__
+ __func__
));
return;
diff --git a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c index edbf8ac431..e7438b18dd 100644 --- a/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c +++ b/OvmfPkg/SmmControl2Dxe/SmmControl2Dxe.c @@ -205,7 +205,7 @@ SmmControl2DxeEntryPoint ( DEBUG ((
DEBUG_ERROR,
"%a: this Q35 implementation lacks SMI\n",
- __FUNCTION__
+ __func__
));
goto FatalError;
}
@@ -234,7 +234,7 @@ SmmControl2DxeEntryPoint ( DEBUG ((
DEBUG_ERROR,
"%a: failed to lock down GBL_SMI_EN\n",
- __FUNCTION__
+ __func__
));
goto FatalError;
}
@@ -260,7 +260,7 @@ SmmControl2DxeEntryPoint ( &mS3SaveStateInstalled
);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: CreateEvent: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: CreateEvent: %r\n", __func__, Status));
goto FatalError;
}
@@ -273,7 +273,7 @@ SmmControl2DxeEntryPoint ( DEBUG ((
DEBUG_ERROR,
"%a: RegisterProtocolNotify: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto ReleaseEvent;
@@ -284,7 +284,7 @@ SmmControl2DxeEntryPoint ( //
Status = gBS->SignalEvent (mS3SaveStateInstalled);
if (EFI_ERROR (Status)) {
- DEBUG ((DEBUG_ERROR, "%a: SignalEvent: %r\n", __FUNCTION__, Status));
+ DEBUG ((DEBUG_ERROR, "%a: SignalEvent: %r\n", __func__, Status));
goto ReleaseEvent;
}
}
@@ -303,7 +303,7 @@ SmmControl2DxeEntryPoint ( DEBUG ((
DEBUG_ERROR,
"%a: InstallMultipleProtocolInterfaces: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
goto ReleaseEvent;
@@ -376,7 +376,7 @@ OnS3SaveStateInstalled ( DEBUG ((
DEBUG_ERROR,
"%a: EFI_BOOT_SCRIPT_IO_READ_WRITE_OPCODE: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
ASSERT (FALSE);
@@ -400,14 +400,14 @@ OnS3SaveStateInstalled ( DEBUG ((
DEBUG_ERROR,
"%a: EFI_BOOT_SCRIPT_PCI_CONFIG_READ_WRITE_OPCODE: %r\n",
- __FUNCTION__,
+ __func__,
Status
));
ASSERT (FALSE);
CpuDeadLoop ();
}
- DEBUG ((DEBUG_VERBOSE, "%a: chipset boot script saved\n", __FUNCTION__));
+ DEBUG ((DEBUG_VERBOSE, "%a: chipset boot script saved\n", __func__));
//
// Append a boot script fragment that re-selects the negotiated SMI features.
|