Skip to content

Commit dbef618

Browse files
committed
Update all instances of __FUNCTION__ to __func__.
Update all the instances of __FUNCTION__to __func__ to match Edk2 coding style changes.
1 parent f0a0094 commit dbef618

File tree

58 files changed

+252
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+252
-252
lines changed

Platforms/QemuQ35Pkg/AcpiPlatformDxe/CloudHvAcpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ InstallCloudHvTables (
9898
// then we're out of sync with the hypervisor, and cannot continue.
9999
//
100100
if (DsdtTable == NULL) {
101-
DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __FUNCTION__));
101+
DEBUG ((DEBUG_ERROR, "%a: no DSDT found\n", __func__));
102102
ASSERT (FALSE);
103103
CpuDeadLoop ();
104104
}

Platforms/QemuQ35Pkg/AcpiPlatformDxe/EntryPoint.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ OnRootBridgesConnected (
4646
DEBUG ((
4747
DEBUG_INFO,
4848
"%a: root bridges have been connected, installing ACPI tables\n",
49-
__FUNCTION__
49+
__func__
5050
));
5151
Status = InstallAcpiTables (FindAcpiTableProtocol ());
5252
if (EFI_ERROR (Status)) {
53-
DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __FUNCTION__, Status));
53+
DEBUG ((DEBUG_ERROR, "%a: InstallAcpiTables: %r\n", __func__, Status));
5454
}
5555

5656
gBS->CloseEvent (Event);
@@ -76,7 +76,7 @@ AcpiPlatformEntryPoint (
7676
DEBUG_INFO,
7777
"%a: PCI or its enumeration disabled, installing "
7878
"ACPI tables\n",
79-
__FUNCTION__
79+
__func__
8080
));
8181
return InstallAcpiTables (FindAcpiTableProtocol ());
8282
}
@@ -99,7 +99,7 @@ AcpiPlatformEntryPoint (
9999
DEBUG ((
100100
DEBUG_INFO,
101101
"%a: waiting for root bridges to be connected, registered callback\n",
102-
__FUNCTION__
102+
__func__
103103
));
104104
}
105105

Platforms/QemuQ35Pkg/AcpiPlatformDxe/PciDecoding.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ EnablePciDecoding (
7878
DEBUG ((
7979
DEBUG_WARN,
8080
"%a: LocateHandleBuffer(): %r\n",
81-
__FUNCTION__,
81+
__func__,
8282
Status
8383
));
8484
return;
@@ -89,7 +89,7 @@ EnablePciDecoding (
8989
DEBUG ((
9090
DEBUG_WARN,
9191
"%a: AllocatePool(): out of resources\n",
92-
__FUNCTION__
92+
__func__
9393
));
9494
goto FreeHandles;
9595
}
@@ -122,7 +122,7 @@ EnablePciDecoding (
122122
DEBUG ((
123123
DEBUG_WARN,
124124
"%a: EfiPciIoAttributeOperationGet: %r\n",
125-
__FUNCTION__,
125+
__func__,
126126
Status
127127
));
128128
goto RestoreAttributes;
@@ -141,7 +141,7 @@ EnablePciDecoding (
141141
DEBUG ((
142142
DEBUG_WARN,
143143
"%a: EfiPciIoAttributeOperationSupported: %r\n",
144-
__FUNCTION__,
144+
__func__,
145145
Status
146146
));
147147
goto RestoreAttributes;
@@ -161,7 +161,7 @@ EnablePciDecoding (
161161
DEBUG ((
162162
DEBUG_WARN,
163163
"%a: EfiPciIoAttributeOperationEnable: %r\n",
164-
__FUNCTION__,
164+
__func__,
165165
Status
166166
));
167167
goto RestoreAttributes;

Platforms/QemuQ35Pkg/AcpiPlatformDxe/QemuFwCfgAcpi.c

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ CollectAllocationsRestrictedTo32Bit (
236236
}
237237

238238
if (AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {
239-
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
239+
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
240240
Status = EFI_PROTOCOL_ERROR;
241241
goto RollBack;
242242
}
@@ -251,7 +251,7 @@ CollectAllocationsRestrictedTo32Bit (
251251
DEBUG ((
252252
DEBUG_VERBOSE,
253253
"%a: restricting blob \"%a\" from 64-bit allocation\n",
254-
__FUNCTION__,
254+
__func__,
255255
AddPointer->PointeeFile
256256
));
257257
break;
@@ -328,15 +328,15 @@ ProcessCmdAllocate (
328328
BLOB *Blob;
329329

330330
if (Allocate->File[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {
331-
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
331+
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
332332
return EFI_PROTOCOL_ERROR;
333333
}
334334

335335
if (Allocate->Alignment > EFI_PAGE_SIZE) {
336336
DEBUG ((
337337
DEBUG_ERROR,
338338
"%a: unsupported alignment 0x%x\n",
339-
__FUNCTION__,
339+
__func__,
340340
Allocate->Alignment
341341
));
342342
return EFI_UNSUPPORTED;
@@ -347,7 +347,7 @@ ProcessCmdAllocate (
347347
DEBUG ((
348348
DEBUG_ERROR,
349349
"%a: QemuFwCfgFindFile(\"%a\"): %r\n",
350-
__FUNCTION__,
350+
__func__,
351351
Allocate->File,
352352
Status
353353
));
@@ -390,7 +390,7 @@ ProcessCmdAllocate (
390390
DEBUG ((
391391
DEBUG_ERROR,
392392
"%a: duplicated file \"%a\"\n",
393-
__FUNCTION__,
393+
__func__,
394394
Allocate->File
395395
));
396396
Status = EFI_PROTOCOL_ERROR;
@@ -408,7 +408,7 @@ ProcessCmdAllocate (
408408
DEBUG_VERBOSE,
409409
"%a: File=\"%a\" Alignment=0x%x Zone=%d Size=0x%Lx "
410410
"Address=0x%Lx\n",
411-
__FUNCTION__,
411+
__func__,
412412
Allocate->File,
413413
Allocate->Alignment,
414414
Allocate->Zone,
@@ -460,7 +460,7 @@ ProcessCmdAddPointer (
460460
if ((AddPointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') ||
461461
(AddPointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0'))
462462
{
463-
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
463+
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
464464
return EFI_PROTOCOL_ERROR;
465465
}
466466

@@ -470,7 +470,7 @@ ProcessCmdAddPointer (
470470
DEBUG ((
471471
DEBUG_ERROR,
472472
"%a: invalid blob reference(s) \"%a\" / \"%a\"\n",
473-
__FUNCTION__,
473+
__func__,
474474
AddPointer->PointerFile,
475475
AddPointer->PointeeFile
476476
));
@@ -487,7 +487,7 @@ ProcessCmdAddPointer (
487487
DEBUG ((
488488
DEBUG_ERROR,
489489
"%a: invalid pointer location or size in \"%a\"\n",
490-
__FUNCTION__,
490+
__func__,
491491
AddPointer->PointerFile
492492
));
493493
return EFI_PROTOCOL_ERROR;
@@ -500,7 +500,7 @@ ProcessCmdAddPointer (
500500
DEBUG ((
501501
DEBUG_ERROR,
502502
"%a: invalid pointer value in \"%a\"\n",
503-
__FUNCTION__,
503+
__func__,
504504
AddPointer->PointerFile
505505
));
506506
return EFI_PROTOCOL_ERROR;
@@ -520,7 +520,7 @@ ProcessCmdAddPointer (
520520
DEBUG_ERROR,
521521
"%a: relocated pointer value unrepresentable in "
522522
"\"%a\"\n",
523-
__FUNCTION__,
523+
__func__,
524524
AddPointer->PointerFile
525525
));
526526
return EFI_PROTOCOL_ERROR;
@@ -532,7 +532,7 @@ ProcessCmdAddPointer (
532532
DEBUG_VERBOSE,
533533
"%a: PointerFile=\"%a\" PointeeFile=\"%a\" "
534534
"PointerOffset=0x%x PointerSize=%d\n",
535-
__FUNCTION__,
535+
__func__,
536536
AddPointer->PointerFile,
537537
AddPointer->PointeeFile,
538538
AddPointer->PointerOffset,
@@ -568,7 +568,7 @@ ProcessCmdAddChecksum (
568568
BLOB *Blob;
569569

570570
if (AddChecksum->File[QEMU_LOADER_FNAME_SIZE - 1] != '\0') {
571-
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
571+
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
572572
return EFI_PROTOCOL_ERROR;
573573
}
574574

@@ -577,7 +577,7 @@ ProcessCmdAddChecksum (
577577
DEBUG ((
578578
DEBUG_ERROR,
579579
"%a: invalid blob reference \"%a\"\n",
580-
__FUNCTION__,
580+
__func__,
581581
AddChecksum->File
582582
));
583583
return EFI_PROTOCOL_ERROR;
@@ -591,7 +591,7 @@ ProcessCmdAddChecksum (
591591
DEBUG ((
592592
DEBUG_ERROR,
593593
"%a: invalid checksum range in \"%a\"\n",
594-
__FUNCTION__,
594+
__func__,
595595
AddChecksum->File
596596
));
597597
return EFI_PROTOCOL_ERROR;
@@ -605,7 +605,7 @@ ProcessCmdAddChecksum (
605605
DEBUG_VERBOSE,
606606
"%a: File=\"%a\" ResultOffset=0x%x Start=0x%x "
607607
"Length=0x%x\n",
608-
__FUNCTION__,
608+
__func__,
609609
AddChecksum->File,
610610
AddChecksum->ResultOffset,
611611
AddChecksum->Start,
@@ -654,7 +654,7 @@ ProcessCmdWritePointer (
654654
if ((WritePointer->PointerFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0') ||
655655
(WritePointer->PointeeFile[QEMU_LOADER_FNAME_SIZE - 1] != '\0'))
656656
{
657-
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __FUNCTION__));
657+
DEBUG ((DEBUG_ERROR, "%a: malformed file name\n", __func__));
658658
return EFI_PROTOCOL_ERROR;
659659
}
660660

@@ -668,7 +668,7 @@ ProcessCmdWritePointer (
668668
DEBUG ((
669669
DEBUG_ERROR,
670670
"%a: invalid fw_cfg file or blob reference \"%a\" / \"%a\"\n",
671-
__FUNCTION__,
671+
__func__,
672672
WritePointer->PointerFile,
673673
WritePointer->PointeeFile
674674
));
@@ -684,7 +684,7 @@ ProcessCmdWritePointer (
684684
DEBUG ((
685685
DEBUG_ERROR,
686686
"%a: invalid pointer location or size in \"%a\"\n",
687-
__FUNCTION__,
687+
__func__,
688688
WritePointer->PointerFile
689689
));
690690
return EFI_PROTOCOL_ERROR;
@@ -693,7 +693,7 @@ ProcessCmdWritePointer (
693693
PointeeBlob = OrderedCollectionUserStruct (PointeeEntry);
694694
PointerValue = WritePointer->PointeeOffset;
695695
if (PointerValue >= PointeeBlob->Size) {
696-
DEBUG ((DEBUG_ERROR, "%a: invalid PointeeOffset\n", __FUNCTION__));
696+
DEBUG ((DEBUG_ERROR, "%a: invalid PointeeOffset\n", __func__));
697697
return EFI_PROTOCOL_ERROR;
698698
}
699699

@@ -710,7 +710,7 @@ ProcessCmdWritePointer (
710710
DEBUG ((
711711
DEBUG_ERROR,
712712
"%a: pointer value unrepresentable in \"%a\"\n",
713-
__FUNCTION__,
713+
__func__,
714714
WritePointer->PointerFile
715715
));
716716
return EFI_PROTOCOL_ERROR;
@@ -731,7 +731,7 @@ ProcessCmdWritePointer (
731731
DEBUG_VERBOSE,
732732
"%a: PointerFile=\"%a\" PointeeFile=\"%a\" "
733733
"PointerOffset=0x%x PointeeOffset=0x%x PointerSize=%d\n",
734-
__FUNCTION__,
734+
__func__,
735735
WritePointer->PointerFile,
736736
WritePointer->PointeeFile,
737737
WritePointer->PointerOffset,
@@ -777,7 +777,7 @@ UndoCmdWritePointer (
777777
DEBUG ((
778778
DEBUG_VERBOSE,
779779
"%a: PointerFile=\"%a\" PointerOffset=0x%x PointerSize=%d\n",
780-
__FUNCTION__,
780+
__func__,
781781
WritePointer->PointerFile,
782782
WritePointer->PointerOffset,
783783
WritePointer->PointerSize
@@ -908,7 +908,7 @@ Process2ndPassCmdAddPointer (
908908
DEBUG ((
909909
DEBUG_VERBOSE,
910910
"%a: PointerValue=0x%Lx already processed, skipping.\n",
911-
__FUNCTION__,
911+
__func__,
912912
PointerValue
913913
));
914914
Status = EFI_SUCCESS;
@@ -922,7 +922,7 @@ Process2ndPassCmdAddPointer (
922922
DEBUG_VERBOSE,
923923
"%a: checking for ACPI header in \"%a\" at 0x%Lx "
924924
"(remaining: 0x%Lx): ",
925-
__FUNCTION__,
925+
__func__,
926926
AddPointer->PointeeFile,
927927
PointerValue,
928928
(UINT64)Blob2Remaining
@@ -997,7 +997,7 @@ Process2ndPassCmdAddPointer (
997997
DEBUG ((
998998
DEBUG_ERROR,
999999
"%a: can't install more than %d tables\n",
1000-
__FUNCTION__,
1000+
__func__,
10011001
INSTALLED_TABLES_MAX
10021002
));
10031003
Status = EFI_OUT_OF_RESOURCES;
@@ -1014,7 +1014,7 @@ Process2ndPassCmdAddPointer (
10141014
DEBUG ((
10151015
DEBUG_ERROR,
10161016
"%a: InstallAcpiTable(): %r\n",
1017-
__FUNCTION__,
1017+
__func__,
10181018
Status
10191019
));
10201020
goto RollbackSeenPointer;
@@ -1081,7 +1081,7 @@ InstallQemuFwCfgTables (
10811081
DEBUG ((
10821082
DEBUG_ERROR,
10831083
"%a: \"etc/table-loader\" has invalid size 0x%Lx\n",
1084-
__FUNCTION__,
1084+
__func__,
10851085
(UINT64)FwCfgSize
10861086
));
10871087
return EFI_PROTOCOL_ERROR;
@@ -1158,7 +1158,7 @@ InstallQemuFwCfgTables (
11581158
DEBUG ((
11591159
DEBUG_VERBOSE,
11601160
"%a: unknown loader command: 0x%x\n",
1161-
__FUNCTION__,
1161+
__func__,
11621162
LoaderEntry->Type
11631163
));
11641164
break;
@@ -1211,7 +1211,7 @@ InstallQemuFwCfgTables (
12111211
AcpiProtocol->UninstallAcpiTable (AcpiProtocol, InstalledKey[Installed]);
12121212
}
12131213
} else {
1214-
DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __FUNCTION__, Installed));
1214+
DEBUG ((DEBUG_INFO, "%a: installed %d tables\n", __func__, Installed));
12151215
}
12161216

12171217
for (SeenPointerEntry = OrderedCollectionMin (SeenPointers);
@@ -1261,7 +1261,7 @@ InstallQemuFwCfgTables (
12611261
DEBUG ((
12621262
DEBUG_VERBOSE,
12631263
"%a: freeing \"%a\"\n",
1264-
__FUNCTION__,
1264+
__func__,
12651265
Blob->File
12661266
));
12671267
gBS->FreePages ((UINTN)Blob->Base, EFI_SIZE_TO_PAGES (Blob->Size));

Platforms/QemuQ35Pkg/ConfigKnobs/ConfigDataGfx/ConfigDataGfx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ ApplyGfxConfigToPolicy (
5858
return EFI_INVALID_PARAMETER;
5959
}
6060

61-
DEBUG ((DEBUG_INFO, "%a Entry...\n", __FUNCTION__));
61+
DEBUG ((DEBUG_INFO, "%a Entry...\n", __func__));
6262

6363
// query autogen header to get config knob value
6464
GfxEnablePort0 = *(BOOLEAN *)ConfigBuffer;

0 commit comments

Comments
 (0)