public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"
@ 2017-06-08  2:33 Star Zeng
       [not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483103B8E4B96@shsmsx102.ccr.corp.intel.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Star Zeng @ 2017-06-08  2:33 UTC (permalink / raw)
  To: edk2-devel; +Cc: Star Zeng, Jiewen Yao, Amy Chan, Chasel Chiu, Chao Zhang

Current code for case "TPM not working properly" uses the predefined
macro __FILE__ in debug format string, but uses predefined macro
__LINE__ as parameter, and it also uses multiple pairs of "" in debug
format string.

To be simple and clear, this patch is to update the code to just use
"DriverEntry: TPM not working properly\n" as the debug message.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
 SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
index 5b7c5c3e165b..4a90c5ccef16 100644
--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c
@@ -1406,9 +1406,7 @@ DriverEntry (
   if (EFI_ERROR (Status)) {
     DEBUG ((
       EFI_D_ERROR,
-      "Line %d in file " __FILE__ ":\n    "
-      "DriverEntry: TPM not working properly\n",
-      __LINE__
+      "DriverEntry: TPM not working properly\n"
       ));
     return Status;
   }
-- 
2.7.0.windows.1



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

* Re: [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"
       [not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483103B8E4B96@shsmsx102.ccr.corp.intel.com>
@ 2017-06-08  8:39   ` Yao, Jiewen
  2017-06-09  5:08     ` Zhang, Chao B
  0 siblings, 1 reply; 3+ messages in thread
From: Yao, Jiewen @ 2017-06-08  8:39 UTC (permalink / raw)
  To: Zeng, Star, edk2-devel@lists.01.org
  Cc: Yao, Jiewen, Chan, Amy, Chiu, Chasel, Zhang, Chao B

Reviewed-by: Jiewen.yao@intel.com




-----Original Message-----
From: Zeng, Star
Sent: Thursday, June 8, 2017 10:33 AM
To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Chan, Amy <amy.chan@intel.com<mailto:amy.chan@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Zhang, Chao B <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>
Subject: [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"



Current code for case "TPM not working properly" uses the predefined macro __FILE__ in debug format string, but uses predefined macro __LINE__ as parameter, and it also uses multiple pairs of "" in debug format string.



To be simple and clear, this patch is to update the code to just use

"DriverEntry: TPM not working properly\n" as the debug message.



Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>

Cc: Amy Chan <amy.chan@intel.com<mailto:amy.chan@intel.com>>

Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>

Cc: Chao Zhang <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>

---

SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)



diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c index 5b7c5c3e165b..4a90c5ccef16 100644

--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c

+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c

@@ -1406,9 +1406,7 @@ DriverEntry (

   if (EFI_ERROR (Status)) {

     DEBUG ((

       EFI_D_ERROR,

-      "Line %d in file " __FILE__ ":\n    "

-      "DriverEntry: TPM not working properly\n",

-      __LINE__

+      "DriverEntry: TPM not working properly\n"

       ));

     return Status;

   }

--

2.7.0.windows.1




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

* Re: [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"
  2017-06-08  8:39   ` Yao, Jiewen
@ 2017-06-09  5:08     ` Zhang, Chao B
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Chao B @ 2017-06-09  5:08 UTC (permalink / raw)
  To: Yao, Jiewen, Zeng, Star, edk2-devel@lists.01.org; +Cc: Chan, Amy, Chiu, Chasel

Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>

From: Yao, Jiewen
Sent: Thursday, June 8, 2017 4:39 PM
To: Zeng, Star <star.zeng@intel.com>; edk2-devel@lists.01.org
Cc: Yao, Jiewen <jiewen.yao@intel.com>; Chan, Amy <amy.chan@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Zhang, Chao B <chao.b.zhang@intel.com>
Subject: RE: [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"

Reviewed-by: Jiewen.yao@intel.com<mailto:Jiewen.yao@intel.com>




-----Original Message-----
From: Zeng, Star
Sent: Thursday, June 8, 2017 10:33 AM
To: edk2-devel@lists.01.org<mailto:edk2-devel@lists.01.org>
Cc: Zeng, Star <star.zeng@intel.com<mailto:star.zeng@intel.com>>; Yao, Jiewen <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>; Chan, Amy <amy.chan@intel.com<mailto:amy.chan@intel.com>>; Chiu, Chasel <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>; Zhang, Chao B <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>
Subject: [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"



Current code for case "TPM not working properly" uses the predefined macro __FILE__ in debug format string, but uses predefined macro __LINE__ as parameter, and it also uses multiple pairs of "" in debug format string.



To be simple and clear, this patch is to update the code to just use

"DriverEntry: TPM not working properly\n" as the debug message.



Cc: Jiewen Yao <jiewen.yao@intel.com<mailto:jiewen.yao@intel.com>>

Cc: Amy Chan <amy.chan@intel.com<mailto:amy.chan@intel.com>>

Cc: Chasel Chiu <chasel.chiu@intel.com<mailto:chasel.chiu@intel.com>>

Cc: Chao Zhang <chao.b.zhang@intel.com<mailto:chao.b.zhang@intel.com>>

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Star Zeng <star.zeng@intel.com<mailto:star.zeng@intel.com>>

---

SecurityPkg/Tcg/TcgDxe/TcgDxe.c | 4 +---

1 file changed, 1 insertion(+), 3 deletions(-)



diff --git a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c index 5b7c5c3e165b..4a90c5ccef16 100644

--- a/SecurityPkg/Tcg/TcgDxe/TcgDxe.c

+++ b/SecurityPkg/Tcg/TcgDxe/TcgDxe.c

@@ -1406,9 +1406,7 @@ DriverEntry (

   if (EFI_ERROR (Status)) {

     DEBUG ((

       EFI_D_ERROR,

-      "Line %d in file " __FILE__ ":\n    "

-      "DriverEntry: TPM not working properly\n",

-      __LINE__

+      "DriverEntry: TPM not working properly\n"

       ));

     return Status;

   }

--

2.7.0.windows.1




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

end of thread, other threads:[~2017-06-09  5:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08  2:33 [PATCH] SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly" Star Zeng
     [not found] ` <0C09AFA07DD0434D9E2A0C6AEB0483103B8E4B96@shsmsx102.ccr.corp.intel.com>
2017-06-08  8:39   ` Yao, Jiewen
2017-06-09  5:08     ` Zhang, Chao B

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