Reporting Issues
Bug 3739 - Update all C/H files in edk2 repo to use DEBUG_* defines instead of EFI_D_* defines
Summary: Update all C/H files in edk2 repo to use DEBUG_* defines instead of EFI_D_* d...
Status: RESOLVED FIXED
Alias: None
Product: EDK2
Classification: Unclassified
Component: Code (show other bugs)
Version: Current
Hardware: All All
: Lowest normal
Assignee: Michael Kinney
URL:
Keywords:
Depends on:
Blocks: 3737
  Show dependency tree
 
Reported: 2021-11-16 22:16 UTC by Michael Kinney
Modified: 2022-01-14 20:11 UTC (History)
4 users (show)

See Also:
EDK II Code First industry standard specifications: ---
Branch URL:
Release(s) the issue is observed: EDK II Master
The OS the target platform is running: ---
Package: ArmPkg, ArmPlatformPkg, ArmVirtPkg, CryptoPkg, DynamicTablesPkg, EmbeddedPkg, EmulatorPkg, FatPkg, FmpDevicePkg, IntelFsp2Pkg, IntelFsp2WrapperPkg, MdeModulePkg, MdePkg, NetworkPkg, OvmfPkg, PcAtChipsetPkg, RedfishPkg, SecurityPkg, ShellPkg, SignedCapsulePkg, SourceLevelDebugPkg, StandaloneMmPkg, UefiCpuPkg, UefiPayloadPkg, UnitTestFrameworkPkg
Release(s) the issues must be fixed: EDK II Master
Tianocore documents:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Kinney 2021-11-16 22:16:47 UTC
The ECC tool requires that the DEBUG_* defines be used
in DEBUG() macros.

ECC only scans file that have changes so there is still lingering
use of EFI_D_*.  Update all C/H files to use DEBUG_* defines instead.
Comment 1 Michael Kinney 2021-11-16 22:18:12 UTC
Assign to owner
Comment 2 Michael Kinney 2021-11-16 22:19:06 UTC
This issue was highlighted when applying uncrustify.

As a result the uncrustify update depends on this change.
Comment 3 Leif Lindholm 2021-11-17 06:13:00 UTC
Quick ocular inspection suggests

find * -type f | xargs sed -i 's/EFI_D_/DEBUG_/g'

does the right thing, apart from MdePkg/Include/Library/DebugLib.h

Are you already on this, or should I send a set out?
Comment 4 Michael Kinney 2022-01-14 20:11:10 UTC
This change was included in the uncrustify patch series
that was merged in the following PR:

    https://github.com/tianocore/edk2/pull/2242

This patch series is composed of 72 commits.  Push range: 
    https://github.com/tianocore/edk2/pull/2242/commits/8c2820c0502820d957b200f9d7ae3e15ecc6368e
    ...
    https://github.com/tianocore/edk2/pull/2242/commits/e0f4416242c7c6b7d06d8939f45da837df06a116

============================================================
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3767
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3739

* Update all use of EFI_D_* defines in DEBUG() macros to DEBUG_* defines.
* Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.
* Change complex DEBUG_CODE() to DEBUG_CODE_BEGIN/END()
* Apply uncrustify changes to all package .c/.h files(BaseTools excluded)

devel@edk2.groups.io discussions:
* https://edk2.groups.io/g/devel/topic/uncrustify_conversion/87414953?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,87414953,previd=1638890440315310506,nextid=1638842194018157807&previd=1638890440315310506&nextid=1638842194018157807
* https://edk2.groups.io/g/devel/message/84132
* https://edk2.groups.io/g/devel/message/84112
* https://edk2.groups.io/g/devel/message/84074

Compare Build Results across all commits in this PR
* Detects any binary differences across entire patch series (obj, lib, dll, efi, ffs, fv, fd)
* repo: https://github.com/mdkinney/edk2
* ref1: 8c2820c0502820d957b200f9d7ae3e15ecc6368e
* ref2: e0f4416242c7c6b7d06d8939f45da837df06a116
* 30 VS2019 build comparisons. Pass 100%.  No binary differences detected.
* 40 GCC5 build comparisons. Pass 100%.    No binary differences detected.
* https://github.com/mdkinney/edk2/actions/runs/1550132292

Cc: Andrew Fish afish@apple.com
Cc: Leif Lindholm leif@nuviainc.com
Cc: Michael D Kinney michael.d.kinney@intel.com
Cc: Michael Kubacki michael.kubacki@microsoft.com