From d19a66f6da7b6120615347d1b5314e317f72e966 Mon Sep 17 00:00:00 2001 From: Vitalii Chulak Date: Mon, 16 Dec 2024 10:43:49 +0200 Subject: [PATCH] RHEL-69072: clang-format for pvpanic folder Signed-off-by: Vitalii Chulak --- .github/workflows/clang-format.yml | 2 +- pvpanic/pvpanic/bugcheck.c | 38 +++---- pvpanic/pvpanic/power.c | 163 +++++++++++++++-------------- pvpanic/pvpanic/pvpanic.c | 25 ++--- pvpanic/pvpanic/pvpanic.h | 33 +++--- pvpanic/pvpanic/trace.h | 23 ++-- 6 files changed, 135 insertions(+), 149 deletions(-) mode change 100755 => 100644 pvpanic/pvpanic/bugcheck.c mode change 100755 => 100644 pvpanic/pvpanic/power.c mode change 100755 => 100644 pvpanic/pvpanic/pvpanic.c mode change 100755 => 100644 pvpanic/pvpanic/pvpanic.h mode change 100755 => 100644 pvpanic/pvpanic/trace.h diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 1b2d84433..bd5582867 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -9,7 +9,7 @@ jobs: matrix: path: - check: '.' - exclude: './ivshmem|./NetKVM|./pciserial|./pvpanic|./viocrypt|./viofs|./viogpu|./vioinput|./viomem|./viorng|./vioscsi|./vioserial|./viosock|./viostor|./VirtIO' + exclude: './ivshmem|./NetKVM|./pciserial|./viocrypt|./viofs|./viogpu|./vioinput|./viomem|./viorng|./vioscsi|./vioserial|./viosock|./viostor|./VirtIO' - check: 'VirtIO' exclude: '' diff --git a/pvpanic/pvpanic/bugcheck.c b/pvpanic/pvpanic/bugcheck.c old mode 100755 new mode 100644 index 8937e812d..e16dd99af --- a/pvpanic/pvpanic/bugcheck.c +++ b/pvpanic/pvpanic/bugcheck.c @@ -38,7 +38,7 @@ KBUGCHECK_REASON_CALLBACK_ROUTINE PVPanicOnDumpBugCheck; VOID PVPanicOnBugCheck(IN PVOID Buffer, IN ULONG Length) { - //Trigger the PVPANIC_PANICKED event if the crash dump isn't enabled, + // Trigger the PVPANIC_PANICKED event if the crash dump isn't enabled, if ((Buffer != NULL) && (Length == sizeof(PVOID)) && !bEmitCrashLoadedEvent) { if (BusType & PVPANIC_PCI) @@ -48,16 +48,15 @@ VOID PVPanicOnBugCheck(IN PVOID Buffer, IN ULONG Length) } } -VOID PVPanicOnDumpBugCheck( - KBUGCHECK_CALLBACK_REASON Reason, - PKBUGCHECK_REASON_CALLBACK_RECORD Record, - PVOID Data, - ULONG Length) +VOID PVPanicOnDumpBugCheck(KBUGCHECK_CALLBACK_REASON Reason, + PKBUGCHECK_REASON_CALLBACK_RECORD Record, + PVOID Data, + ULONG Length) { UNREFERENCED_PARAMETER(Data); UNREFERENCED_PARAMETER(Length); - //Trigger the PVPANIC_CRASHLOADED event before the crash dump. + // Trigger the PVPANIC_CRASHLOADED event before the crash dump. if ((PvPanicPortOrMemAddress != NULL) && (Reason == KbCallbackDumpIo) && !bEmitCrashLoadedEvent) { if (BusType & PVPANIC_PCI) @@ -67,7 +66,7 @@ VOID PVPanicOnDumpBugCheck( bEmitCrashLoadedEvent = TRUE; } - //Deregister BugCheckReasonCallback after PVPANIC_CRASHLOADED is triggered. + // Deregister BugCheckReasonCallback after PVPANIC_CRASHLOADED is triggered. if (bEmitCrashLoadedEvent) KeDeregisterBugCheckReasonCallback(Record); } @@ -81,23 +80,26 @@ VOID PVPanicRegisterBugCheckCallback(IN PVOID PortAddress, PUCHAR Component) if (SupportedFeature & PVPANIC_PANICKED) { - bBugCheck = KeRegisterBugCheckCallback(&CallbackRecord, PVPanicOnBugCheck, - (PVOID)PortAddress, sizeof(PVOID), Component); + bBugCheck = KeRegisterBugCheckCallback(&CallbackRecord, + PVPanicOnBugCheck, + (PVOID)PortAddress, + sizeof(PVOID), + Component); if (!bBugCheck) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "Failed to register bug check callback function."); + TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "Failed to register bug check callback function."); } } if (SupportedFeature & PVPANIC_CRASHLOADED) { bBugCheck = KeRegisterBugCheckReasonCallback(&DumpCallbackRecord, - PVPanicOnDumpBugCheck, KbCallbackDumpIo, Component); + PVPanicOnDumpBugCheck, + KbCallbackDumpIo, + Component); if (!bBugCheck) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "Failed to register bug check reason callback function."); + TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "Failed to register bug check reason callback function."); } } } @@ -111,8 +113,7 @@ VOID PVPanicDeregisterBugCheckCallback() bBugCheck = KeDeregisterBugCheckCallback(&CallbackRecord); if (!bBugCheck) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "Failed to unregister bug check callback function."); + TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "Failed to unregister bug check callback function."); } } @@ -121,8 +122,7 @@ VOID PVPanicDeregisterBugCheckCallback() bBugCheck = KeDeregisterBugCheckReasonCallback(&DumpCallbackRecord); if (!bBugCheck) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "Failed to unregister bug check reason callback function."); + TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "Failed to unregister bug check reason callback function."); } } } diff --git a/pvpanic/pvpanic/power.c b/pvpanic/pvpanic/power.c old mode 100755 new mode 100644 index 5684ce3f0..9c7ff9ce4 --- a/pvpanic/pvpanic/power.c +++ b/pvpanic/pvpanic/power.c @@ -47,8 +47,7 @@ NTSTATUS PVPanicEvtDevicePrepareHardware(IN WDFDEVICE Device, UNREFERENCED_PARAMETER(Resources); - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, "--> %!FUNC! Device: %p", - Device); + TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, "--> %!FUNC! Device: %p", Device); PAGED_CODE(); bEmitCrashLoadedEvent = FALSE; @@ -62,74 +61,75 @@ NTSTATUS PVPanicEvtDevicePrepareHardware(IN WDFDEVICE Device, switch (desc->Type) { case CmResourceTypePort: - { - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, - "I/O mapped CSR: (%lx) Length: (%lu)", - desc->u.Port.Start.LowPart, desc->u.Port.Length); + { + TraceEvents(TRACE_LEVEL_VERBOSE, + DBG_POWER, + "I/O mapped CSR: (%lx) Length: (%lu)", + desc->u.Port.Start.LowPart, + desc->u.Port.Length); - context->MappedPort = !(desc->Flags & CM_RESOURCE_PORT_IO); - context->IoRange = desc->u.Port.Length; + context->MappedPort = !(desc->Flags & CM_RESOURCE_PORT_IO); + context->IoRange = desc->u.Port.Length; - if (context->MappedPort) - { + if (context->MappedPort) + { #if defined(NTDDI_WINTHRESHOLD) && (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - context->IoBaseAddress = MmMapIoSpaceEx(desc->u.Port.Start, - desc->u.Port.Length, PAGE_READWRITE | PAGE_NOCACHE); + context->IoBaseAddress = MmMapIoSpaceEx(desc->u.Port.Start, + desc->u.Port.Length, + PAGE_READWRITE | PAGE_NOCACHE); #else - context->IoBaseAddress = MmMapIoSpace(desc->u.Port.Start, - desc->u.Port.Length, MmNonCached); + context->IoBaseAddress = MmMapIoSpace(desc->u.Port.Start, desc->u.Port.Length, MmNonCached); #endif + } + else + { + context->IoBaseAddress = (PVOID)(ULONG_PTR)desc->u.Port.Start.QuadPart; + } + if (BusType & PVPANIC_PCI) + { + TraceEvents(TRACE_LEVEL_ERROR, + DBG_POWER, + "The coexistence of ISA and PCI pvpanic device is not supported, so " + "the ISA pvpanic driver fails to be loaded because the PCI pvpanic " + "driver has been loaded"); + return STATUS_DEVICE_CONFIGURATION_ERROR; + } + else + PvPanicPortOrMemAddress = (PUCHAR)context->IoBaseAddress; + + break; } - else - { - context->IoBaseAddress = - (PVOID)(ULONG_PTR)desc->u.Port.Start.QuadPart; - } - if (BusType & PVPANIC_PCI) - { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "The coexistence of ISA and PCI pvpanic device is not supported, so " - "the ISA pvpanic driver fails to be loaded because the PCI pvpanic " - "driver has been loaded"); - return STATUS_DEVICE_CONFIGURATION_ERROR; - } - else - PvPanicPortOrMemAddress = (PUCHAR)context->IoBaseAddress; - - break; - } case CmResourceTypeMemory: - { - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, - "Memory mapped CSR: (%lx) Length: (%lu)", - desc->u.Memory.Start.LowPart, desc->u.Memory.Length); + { + TraceEvents(TRACE_LEVEL_VERBOSE, + DBG_POWER, + "Memory mapped CSR: (%lx) Length: (%lu)", + desc->u.Memory.Start.LowPart, + desc->u.Memory.Length); - context->MemRange = desc->u.Memory.Length; + context->MemRange = desc->u.Memory.Length; #if defined(NTDDI_WINTHRESHOLD) && (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) - context->MemBaseAddress = MmMapIoSpaceEx( - desc->u.Memory.Start, - desc->u.Memory.Length, - PAGE_READWRITE | PAGE_NOCACHE); + context->MemBaseAddress = MmMapIoSpaceEx(desc->u.Memory.Start, + desc->u.Memory.Length, + PAGE_READWRITE | PAGE_NOCACHE); #else - context->MemBaseAddress = MmMapIoSpace( - desc->u.Memory.Start, - desc->u.Memory.Length, - MmNonCached); + context->MemBaseAddress = MmMapIoSpace(desc->u.Memory.Start, desc->u.Memory.Length, MmNonCached); #endif - if (BusType & PVPANIC_ISA) - { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "The coexistence of ISA and PCI pvpanic device is not supported, so " - "the PCI pvpanic driver fails to be loaded because the ISA pvpanic " - "driver has been loaded"); - return STATUS_DEVICE_CONFIGURATION_ERROR; + if (BusType & PVPANIC_ISA) + { + TraceEvents(TRACE_LEVEL_ERROR, + DBG_POWER, + "The coexistence of ISA and PCI pvpanic device is not supported, so " + "the PCI pvpanic driver fails to be loaded because the ISA pvpanic " + "driver has been loaded"); + return STATUS_DEVICE_CONFIGURATION_ERROR; + } + else + PvPanicPortOrMemAddress = (PUCHAR)context->MemBaseAddress; + + break; } - else - PvPanicPortOrMemAddress = (PUCHAR)context->MemBaseAddress; - - break; - } default: break; } @@ -145,31 +145,37 @@ NTSTATUS PVPanicEvtDevicePrepareHardware(IN WDFDEVICE Device, { BusType |= PVPANIC_ISA; SupportedFeature = READ_PORT_UCHAR((PUCHAR)(context->IoBaseAddress)); - TraceEvents(TRACE_LEVEL_INFORMATION, DBG_POWER, - "read feature from IoBaseAddress 0x%p SupportedFeature 0x%x \n", - context->IoBaseAddress, SupportedFeature); + TraceEvents(TRACE_LEVEL_INFORMATION, + DBG_POWER, + "read feature from IoBaseAddress 0x%p SupportedFeature 0x%x \n", + context->IoBaseAddress, + SupportedFeature); } else if (context->MemBaseAddress) { BusType |= PVPANIC_PCI; SupportedFeature = *(PUCHAR)(context->MemBaseAddress); - TraceEvents(TRACE_LEVEL_INFORMATION, DBG_POWER, - "read feature 0x%p *MemBaseAddress 0x%x SupportedFeature 0x%x \n", - context->MemBaseAddress, *(PUSHORT)(context->MemBaseAddress), SupportedFeature); + TraceEvents(TRACE_LEVEL_INFORMATION, + DBG_POWER, + "read feature 0x%p *MemBaseAddress 0x%x SupportedFeature 0x%x \n", + context->MemBaseAddress, + *(PUSHORT)(context->MemBaseAddress), + SupportedFeature); } if (SupportedFeature & (PVPANIC_PANICKED | PVPANIC_CRASHLOADED)) { - TraceEvents(TRACE_LEVEL_INFORMATION, DBG_POWER, - "PVPANIC_PANICKED notification feature %s supported.", - (SupportedFeature & PVPANIC_PANICKED) ? "is" : "is not"); - TraceEvents(TRACE_LEVEL_INFORMATION, DBG_POWER, - "PVPANIC_CRASHLOADED notification feature %s supported.", - (SupportedFeature & PVPANIC_CRASHLOADED) ? "is" : "is not"); + TraceEvents(TRACE_LEVEL_INFORMATION, + DBG_POWER, + "PVPANIC_PANICKED notification feature %s supported.", + (SupportedFeature & PVPANIC_PANICKED) ? "is" : "is not"); + TraceEvents(TRACE_LEVEL_INFORMATION, + DBG_POWER, + "PVPANIC_CRASHLOADED notification feature %s supported.", + (SupportedFeature & PVPANIC_CRASHLOADED) ? "is" : "is not"); } else { - TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, - "Panic notification feature is not supported."); + TraceEvents(TRACE_LEVEL_ERROR, DBG_POWER, "Panic notification feature is not supported."); return STATUS_DEVICE_CONFIGURATION_ERROR; } @@ -178,8 +184,7 @@ NTSTATUS PVPanicEvtDevicePrepareHardware(IN WDFDEVICE Device, return STATUS_SUCCESS; } -NTSTATUS PVPanicEvtDeviceReleaseHardware(IN WDFDEVICE Device, - IN WDFCMRESLIST ResourcesTranslated) +NTSTATUS PVPanicEvtDeviceReleaseHardware(IN WDFDEVICE Device, IN WDFCMRESLIST ResourcesTranslated) { PDEVICE_CONTEXT context = GetDeviceContext(Device); @@ -205,15 +210,13 @@ NTSTATUS PVPanicEvtDeviceReleaseHardware(IN WDFDEVICE Device, return STATUS_SUCCESS; } -NTSTATUS PVPanicEvtDeviceD0Entry(IN WDFDEVICE Device, - IN WDF_POWER_DEVICE_STATE PreviousState) +NTSTATUS PVPanicEvtDeviceD0Entry(IN WDFDEVICE Device, IN WDF_POWER_DEVICE_STATE PreviousState) { PDEVICE_CONTEXT context = GetDeviceContext(Device); UNREFERENCED_PARAMETER(PreviousState); - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, "--> %!FUNC! Device: %p", - Device); + TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, "--> %!FUNC! Device: %p", Device); PAGED_CODE(); @@ -227,14 +230,12 @@ NTSTATUS PVPanicEvtDeviceD0Entry(IN WDFDEVICE Device, return STATUS_SUCCESS; } -NTSTATUS PVPanicEvtDeviceD0Exit(IN WDFDEVICE Device, - IN WDF_POWER_DEVICE_STATE TargetState) +NTSTATUS PVPanicEvtDeviceD0Exit(IN WDFDEVICE Device, IN WDF_POWER_DEVICE_STATE TargetState) { UNREFERENCED_PARAMETER(Device); UNREFERENCED_PARAMETER(TargetState); - TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, "--> %!FUNC! Device: %p", - Device); + TraceEvents(TRACE_LEVEL_VERBOSE, DBG_POWER, "--> %!FUNC! Device: %p", Device); PAGED_CODE(); diff --git a/pvpanic/pvpanic/pvpanic.c b/pvpanic/pvpanic/pvpanic.c old mode 100755 new mode 100644 index adf6cf64f..75f53e58e --- a/pvpanic/pvpanic/pvpanic.c +++ b/pvpanic/pvpanic/pvpanic.c @@ -36,8 +36,7 @@ #pragma alloc_text(PAGE, PVPanicEvtDriverContextCleanup) #endif -NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, - IN PUNICODE_STRING RegistryPath) +NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath) { NTSTATUS status; WDF_DRIVER_CONFIG config; @@ -55,13 +54,11 @@ NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, WDF_DRIVER_CONFIG_INIT(&config, PVPanicEvtDeviceAdd); - status = WdfDriverCreate(DriverObject, RegistryPath, &attributes, - &config, WDF_NO_HANDLE); + status = WdfDriverCreate(DriverObject, RegistryPath, &attributes, &config, WDF_NO_HANDLE); if (!NT_SUCCESS(status)) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_INIT, - "WdfDriverCreate failed: %!STATUS!", status); + TraceEvents(TRACE_LEVEL_ERROR, DBG_INIT, "WdfDriverCreate failed: %!STATUS!", status); WPP_CLEANUP(DriverObject); } else @@ -75,8 +72,7 @@ NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, return status; } -NTSTATUS PVPanicEvtDeviceAdd(IN WDFDRIVER Driver, - IN PWDFDEVICE_INIT DeviceInit) +NTSTATUS PVPanicEvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit) { NTSTATUS status; WDFDEVICE device; @@ -102,17 +98,14 @@ NTSTATUS PVPanicEvtDeviceAdd(IN WDFDRIVER Driver, WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, DEVICE_CONTEXT); - WDF_FILEOBJECT_CONFIG_INIT(&fileConfig, PVPanicEvtDeviceFileCreate, - WDF_NO_EVENT_CALLBACK, WDF_NO_EVENT_CALLBACK); + WDF_FILEOBJECT_CONFIG_INIT(&fileConfig, PVPanicEvtDeviceFileCreate, WDF_NO_EVENT_CALLBACK, WDF_NO_EVENT_CALLBACK); - WdfDeviceInitSetFileObjectConfig(DeviceInit, &fileConfig, - WDF_NO_OBJECT_ATTRIBUTES); + WdfDeviceInitSetFileObjectConfig(DeviceInit, &fileConfig, WDF_NO_OBJECT_ATTRIBUTES); status = WdfDeviceCreate(&DeviceInit, &attributes, &device); if (!NT_SUCCESS(status)) { - TraceEvents(TRACE_LEVEL_ERROR, DBG_INIT, - "WdfDeviceCreate failed: %!STATUS!", status); + TraceEvents(TRACE_LEVEL_ERROR, DBG_INIT, "WdfDeviceCreate failed: %!STATUS!", status); return status; } @@ -137,9 +130,7 @@ VOID PVPanicEvtDriverContextCleanup(IN WDFOBJECT DriverObject) WPP_CLEANUP(WdfDriverWdmGetDriverObject((WDFDRIVER)DriverObject)); } -VOID PVPanicEvtDeviceFileCreate(IN WDFDEVICE Device, - IN WDFREQUEST Request, - IN WDFFILEOBJECT FileObject) +VOID PVPanicEvtDeviceFileCreate(IN WDFDEVICE Device, IN WDFREQUEST Request, IN WDFFILEOBJECT FileObject) { UNREFERENCED_PARAMETER(Device); UNREFERENCED_PARAMETER(FileObject); diff --git a/pvpanic/pvpanic/pvpanic.h b/pvpanic/pvpanic/pvpanic.h old mode 100755 new mode 100644 index 5a123a84c..c1b5afaf8 --- a/pvpanic/pvpanic/pvpanic.h +++ b/pvpanic/pvpanic/pvpanic.h @@ -33,34 +33,35 @@ #include "trace.h" // The bit of supported PV event. -#define PVPANIC_F_PANICKED 0 -#define PVPANIC_F_CRASHLOADED 1 +#define PVPANIC_F_PANICKED 0 +#define PVPANIC_F_CRASHLOADED 1 // The PV event value. -#define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED) -#define PVPANIC_CRASHLOADED (1 << PVPANIC_F_CRASHLOADED) +#define PVPANIC_PANICKED (1 << PVPANIC_F_PANICKED) +#define PVPANIC_CRASHLOADED (1 << PVPANIC_F_CRASHLOADED) // The bit of supported bus type. -#define PVPANIC_F_ISA 0 -#define PVPANIC_F_PCI 1 +#define PVPANIC_F_ISA 0 +#define PVPANIC_F_PCI 1 // The bus type value. -#define PVPANIC_ISA (1 << PVPANIC_F_ISA) -#define PVPANIC_PCI (1 << PVPANIC_F_PCI) +#define PVPANIC_ISA (1 << PVPANIC_F_ISA) +#define PVPANIC_PCI (1 << PVPANIC_F_PCI) PUCHAR PvPanicPortOrMemAddress; BOOLEAN bEmitCrashLoadedEvent; -UCHAR BusType; -UCHAR SupportedFeature; +UCHAR BusType; +UCHAR SupportedFeature; -typedef struct _DEVICE_CONTEXT { +typedef struct _DEVICE_CONTEXT +{ // HW Resources. - PVOID IoBaseAddress; - ULONG IoRange; - BOOLEAN MappedPort; - PVOID MemBaseAddress; - ULONG MemRange; + PVOID IoBaseAddress; + ULONG IoRange; + BOOLEAN MappedPort; + PVOID MemBaseAddress; + ULONG MemRange; } DEVICE_CONTEXT, *PDEVICE_CONTEXT; diff --git a/pvpanic/pvpanic/trace.h b/pvpanic/pvpanic/trace.h old mode 100755 new mode 100644 index df9b3cb7f..7ce00fcb4 --- a/pvpanic/pvpanic/trace.h +++ b/pvpanic/pvpanic/trace.h @@ -33,25 +33,18 @@ // Tracing GUID - 5eeabb8c-be9a-40d0-99fd-86f2a0b21378 // -#define WPP_CONTROL_GUIDS \ - WPP_DEFINE_CONTROL_GUID( \ - PVPanicTraceGuid, (5eeabb8c,be9a,40d0,99fd,86f2a0b21378), \ - WPP_DEFINE_BIT(DBG_ALL) \ - WPP_DEFINE_BIT(DBG_INIT) \ - WPP_DEFINE_BIT(DBG_POWER) \ - ) +#define WPP_CONTROL_GUIDS \ + WPP_DEFINE_CONTROL_GUID(PVPanicTraceGuid, \ + (5eeabb8c, be9a, 40d0, 99fd, 86f2a0b21378), \ + WPP_DEFINE_BIT(DBG_ALL) WPP_DEFINE_BIT(DBG_INIT) WPP_DEFINE_BIT(DBG_POWER)) -#define WPP_FLAG_LEVEL_LOGGER(flag, level) \ - WPP_LEVEL_LOGGER(flag) +#define WPP_FLAG_LEVEL_LOGGER(flag, level) WPP_LEVEL_LOGGER(flag) -#define WPP_FLAG_LEVEL_ENABLED(flag, level) \ - (WPP_LEVEL_ENABLED(flag) && WPP_CONTROL(WPP_BIT_ ## flag).Level >= level) +#define WPP_FLAG_LEVEL_ENABLED(flag, level) (WPP_LEVEL_ENABLED(flag) && WPP_CONTROL(WPP_BIT_##flag).Level >= level) -#define WPP_LEVEL_FLAGS_LOGGER(lvl,flags) \ - WPP_LEVEL_LOGGER(flags) +#define WPP_LEVEL_FLAGS_LOGGER(lvl, flags) WPP_LEVEL_LOGGER(flags) -#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) \ - (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_ ## flags).Level >= lvl) +#define WPP_LEVEL_FLAGS_ENABLED(lvl, flags) (WPP_LEVEL_ENABLED(flags) && WPP_CONTROL(WPP_BIT_##flags).Level >= lvl) // // This comment block is scanned by the trace preprocessor to define our