public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "PierreGondois" <pierre.gondois@arm.com>
To: devel@edk2.groups.io, Sami.Mujawar@arm.com, Alexei.Fedorov@arm.com
Subject: [PATCH v1 07/10] DynamicTablesPkg: Use %a formatter in AmlDbgPrint
Date: Wed, 23 Jun 2021 12:05:21 +0100	[thread overview]
Message-ID: <20210623110525.6171-8-Pierre.Gondois@arm.com> (raw)
In-Reply-To: <20210623110525.6171-1-Pierre.Gondois@arm.com>

From: Pierre Gondois <Pierre.Gondois@arm.com>

The correct formatter to print a CHAR8 char in edk2 is '%a'.
Replace the '%s' formatters by '%a'.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
---
 .../Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c      | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c b/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c
index 00a61a2fe63a..7f4cd3404dbb 100644
--- a/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c
+++ b/DynamicTablesPkg/Library/Common/AmlLib/AmlDbgPrint/AmlDbgPrint.c
@@ -2,7 +2,7 @@
   AML Print Function.
 
   Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
-  Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.<BR>
+  Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.<BR>
 
   SPDX-License-Identifier: BSD-2-Clause-Patent
 **/
@@ -199,7 +199,7 @@ AmlDbgPrintNodeHeader (
 
   DEBUG ((
     DEBUG_INFO,
-    "%3d | %-15s | ",
+    "%3d | %-15a | ",
     Level,
     NodeTypeStrTbl[Node->NodeType]
     ));
@@ -227,7 +227,7 @@ AmlDbgPrintDataNode (
 
   AmlDbgPrintNodeHeader ((AML_NODE_HEADER*)DataNode, Level);
 
-  DEBUG ((DEBUG_INFO, "%-36s | ", NodeDataTypeStrTbl[DataNode->DataType]));
+  DEBUG ((DEBUG_INFO, "%-36a | ", NodeDataTypeStrTbl[DataNode->DataType]));
   DEBUG ((DEBUG_INFO, "0x%04x | ", DataNode->Size));
 
   if ((DataNode->DataType == EAmlNodeDataTypeNameString) ||
@@ -300,13 +300,13 @@ AmlDbgPrintObjectNode (
 
   // Print a string corresponding to the field object OpCode/SubOpCode.
   if (AmlNodeHasAttribute (ObjectNode, AML_IS_FIELD_ELEMENT)) {
-    DEBUG ((DEBUG_INFO, "%-15s ", AmlGetFieldOpCodeStr (
+    DEBUG ((DEBUG_INFO, "%-15a ", AmlGetFieldOpCodeStr (
                                     ObjectNode->AmlByteEncoding->OpCode,
                                     0
                                     )));
   } else {
     // Print a string corresponding to the object OpCode/SubOpCode.
-    DEBUG ((DEBUG_INFO, "%-15s | ", AmlGetOpCodeStr (
+    DEBUG ((DEBUG_INFO, "%-15a | ", AmlGetOpCodeStr (
                                       ObjectNode->AmlByteEncoding->OpCode,
                                       ObjectNode->AmlByteEncoding->SubOpCode)
                                       ));
@@ -378,19 +378,19 @@ AmlDbgPrintTableHeader (
   DEBUG ((DEBUG_INFO, "Lvl | Node Type       |\n"));
   DEBUG ((
     DEBUG_INFO,
-    "    | %-15s | Signature| Length     | Rev | CSum | OemId  | "
+    "    | %-15a | Signature| Length     | Rev | CSum | OemId  | "
       "OemTableId       | OemRev   | CreatorId| CreatorRev\n",
     NodeTypeStrTbl[EAmlNodeRoot]
     ));
   DEBUG ((
     DEBUG_INFO,
-    "    | %-15s | Op   | SubOp| OpName          | MaxI| Attribute  | "
+    "    | %-15a | Op   | SubOp| OpName          | MaxI| Attribute  | "
       "PkgLen | NodeName (opt)\n",
     NodeTypeStrTbl[EAmlNodeObject]
     ));
   DEBUG ((
     DEBUG_INFO,
-    "    | %-15s | Data Type                            | Size   | "
+    "    | %-15a | Data Type                            | Size   | "
       "Buffer\n",
     NodeTypeStrTbl[EAmlNodeData]
     ));
-- 
2.17.1


  parent reply	other threads:[~2021-06-23 11:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 11:05 [PATCH v1 00/10] Various DynamicTablesPkg modifications PierreGondois
2021-06-23 11:05 ` [PATCH v1 01/10] DynamicTablesPkg: Extract AcpiTableHelperLib from TableHelperLib PierreGondois
2021-09-22 15:15   ` [edk2-devel] " Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 02/10] DynamicTablesPkg: Update TableHelperLib.inf PierreGondois
2021-09-22 15:16   ` [edk2-devel] " Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 03/10] DynamicTablesPkg: Rename single char input parameter PierreGondois
2021-09-22 15:20   ` [edk2-devel] " Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 04/10] DynamicTablesPkg: Add HexFromAscii() to AcpiHelperLib PierreGondois
2021-09-22 15:23   ` [edk2-devel] " Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 05/10] DynamicTablesPkg: Add AmlGetEisaIdFromString() " PierreGondois
2021-09-22 15:40   ` [edk2-devel] " Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 06/10] DynamicTablesPkg: Add Configuration Manager Object parser PierreGondois
2021-09-24  8:56   ` [edk2-devel] " Joey Gouly
2021-09-27  7:14     ` PierreGondois
2021-09-29 15:03       ` Joey Gouly
2021-06-23 11:05 ` PierreGondois [this message]
2021-09-22 15:44   ` [edk2-devel] [PATCH v1 07/10] DynamicTablesPkg: Use %a formatter in AmlDbgPrint Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 08/10] DynamicTablesPkg: Update DynamicTablesPkg.ci.yaml PierreGondois
2021-09-22 15:48   ` [edk2-devel] " Sami Mujawar
2021-09-23  7:49     ` PierreGondois
2021-06-23 11:05 ` [PATCH v1 09/10] DynamicTablesPkg: Deprecate Crs specific methods in AmlLib PierreGondois
2021-09-22 15:56   ` [edk2-devel] " Sami Mujawar
2021-06-23 11:05 ` [PATCH v1 10/10] DynamicTablesPkg: Rework AmlResourceDataCodegen.c/h PierreGondois
2021-09-22 16:04   ` [edk2-devel] " Sami Mujawar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210623110525.6171-8-Pierre.Gondois@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox