Revision: 19763
http://sourceforge.net/p/edk2/code/19763
Author: lersek
Date: 2016-01-28 11:03:15 +0000 (Thu, 28 Jan 2016)
Log Message:
-----------
MdeModulePkg: NvmExpressDxe: clean up NvmeRead() / NvmeWrite() debug msgs
These workhorse functions are part of the BlockIo protocol that
NvmExpressDxe produces. For bulk data access, they are called very
frequently. Their debug messages should be therefore downgraded to
EFI_D_VERBOSE.
In addition, the following DEBUG() warts are cleaned up:
- The function name should be printed with %a / __FUNCTION__, so that
renaming the function, or copying the DEBUG() elsewhere, be reflected in
the debug output automatically. (In fact, after this patch, the DEBUG()
calls become identical.)
- "Lba" is of type UINT64, therefore it should be printed with %Lx, not
%x.
- "OrginalBlocks" and "Blocks" are both UINTN. The only portable way to
print UINTN is to convert it to UINT64 manually, then format it with the
%Lx (or %Lu) conversion specifier.
Cc: Feng Tian <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
Modified: trunk/edk2/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
===================================================================
--- trunk/edk2/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
2016-01-28 08:08:57 UTC (rev 19762)
+++ trunk/edk2/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressBlockIo.c
2016-01-28 11:03:15 UTC (rev 19763)
@@ -198,7 +198,9 @@
}
}
- DEBUG ((EFI_D_INFO, "NvmeRead() Lba = 0x%08x, Original = 0x%08x, Remaining
= 0x%08x, BlockSize = 0x%x Status = %r\n", Lba, OrginalBlocks, Blocks,
BlockSize, Status));
+ DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+ "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
+ (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
return Status;
}
@@ -257,7 +259,9 @@
}
}
- DEBUG ((EFI_D_INFO, "NvmeWrite() Lba = 0x%08x, Original = 0x%08x, Remaining
= 0x%08x, BlockSize = 0x%x Status = %r\n", Lba, OrginalBlocks, Blocks,
BlockSize, Status));
+ DEBUG ((EFI_D_VERBOSE, "%a: Lba = 0x%08Lx, Original = 0x%08Lx, "
+ "Remaining = 0x%08Lx, BlockSize = 0x%x, Status = %r\n", __FUNCTION__, Lba,
+ (UINT64)OrginalBlocks, (UINT64)Blocks, BlockSize, Status));
return Status;
}
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits