public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiCpuPkg/MtrrLib: Correct debug message
@ 2017-12-07  2:48 Ruiyu Ni
  2017-12-07  2:53 ` Dong, Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Ruiyu Ni @ 2017-12-07  2:48 UTC (permalink / raw)
  To: edk2-devel; +Cc: Eric Dong, Ming Shao

When printing the ascii format of memory attribute in debug message,
%s was used, but %a should be used.
The patch additionally changes %x to %r for EFI_STATUS.

The whole patch doesn't impact functionality of the MtrrLib.
Just debug message fix.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ming Shao <ming.shao@intel.com>
---
 UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index 9c66f93ac2..619b500c1d 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -2489,7 +2489,7 @@ MtrrSetMemoryAttributeInMtrrSettings (
   Range.Type        = Attribute;
   ScratchSize = sizeof (Scratch);
   Status = MtrrSetMemoryAttributesInMtrrSettings (MtrrSetting, Scratch, &ScratchSize, &Range, 1);
-  DEBUG ((DEBUG_CACHE, "MtrrSetMemoryAttribute(MtrrSettings = %p) %s: [%016lx, %016lx) - %x\n",
+  DEBUG ((DEBUG_CACHE, "MtrrSetMemoryAttribute(MtrrSettings = %p) %a: [%016lx, %016lx) - %r\n",
           MtrrSetting,
           mMtrrMemoryCacheTypeShortName[Attribute], BaseAddress, BaseAddress + Length, Status));
 
-- 
2.15.0.gvfs.1.preview.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] UefiCpuPkg/MtrrLib: Correct debug message
  2017-12-07  2:48 [PATCH] UefiCpuPkg/MtrrLib: Correct debug message Ruiyu Ni
@ 2017-12-07  2:53 ` Dong, Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Dong, Eric @ 2017-12-07  2:53 UTC (permalink / raw)
  To: Ni, Ruiyu, edk2-devel@lists.01.org; +Cc: Shao, Ming

Reviewed-by: Eric Dong <eric.dong@intel.com>

-----Original Message-----
From: Ni, Ruiyu 
Sent: Thursday, December 7, 2017 10:49 AM
To: edk2-devel@lists.01.org
Cc: Dong, Eric; Shao, Ming
Subject: [PATCH] UefiCpuPkg/MtrrLib: Correct debug message

When printing the ascii format of memory attribute in debug message, %s was used, but %a should be used.
The patch additionally changes %x to %r for EFI_STATUS.

The whole patch doesn't impact functionality of the MtrrLib.
Just debug message fix.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ming Shao <ming.shao@intel.com>
---
 UefiCpuPkg/Library/MtrrLib/MtrrLib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
index 9c66f93ac2..619b500c1d 100644
--- a/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
+++ b/UefiCpuPkg/Library/MtrrLib/MtrrLib.c
@@ -2489,7 +2489,7 @@ MtrrSetMemoryAttributeInMtrrSettings (
   Range.Type        = Attribute;
   ScratchSize = sizeof (Scratch);
   Status = MtrrSetMemoryAttributesInMtrrSettings (MtrrSetting, Scratch, &ScratchSize, &Range, 1);
-  DEBUG ((DEBUG_CACHE, "MtrrSetMemoryAttribute(MtrrSettings = %p) %s: [%016lx, %016lx) - %x\n",
+  DEBUG ((DEBUG_CACHE, "MtrrSetMemoryAttribute(MtrrSettings = %p) %a: 
+ [%016lx, %016lx) - %r\n",
           MtrrSetting,
           mMtrrMemoryCacheTypeShortName[Attribute], BaseAddress, BaseAddress + Length, Status));
 
--
2.15.0.gvfs.1.preview.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-12-07  2:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-07  2:48 [PATCH] UefiCpuPkg/MtrrLib: Correct debug message Ruiyu Ni
2017-12-07  2:53 ` Dong, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox