]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Bus/Pci/EhciDxe/EhciDebug.c
check the usage of %d,%x,%ld,%lx and so on in debug print statement.
[mirror_edk2.git] / MdeModulePkg / Bus / Pci / EhciDxe / EhciDebug.c
index 25a4dbff9bd8f55b2caffd9024bbd1ceb01934c8..7177c33aa7dd23a687441b32ee453ea246d6224e 100644 (file)
@@ -1,5 +1,7 @@
 /** @file\r
 \r
+  This file provides the information dump support for EHCI when in debug mode.\r
+\r
 Copyright (c) 2007, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
@@ -9,30 +11,19 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-    EhciDebug.c\r
-\r
-Abstract:\r
-  This file provides the information dump support for EHCI when in debug mode.\r
-\r
-Revision History\r
-\r
 **/\r
 \r
 \r
 #include "Ehci.h"\r
 \r
 /**\r
-  Dump the status byte in QTD/QH to a more friendly\r
-  format\r
+  Dump the status byte in QTD/QH to a more friendly format.\r
 \r
-  @param  State    The state in the QTD/QH\r
+  @param  State    The state in the QTD/QH.\r
 \r
-  @return None\r
+  @return None.\r
 \r
 **/\r
-STATIC\r
 VOID\r
 EhcDumpStatus (\r
   IN UINT32               State\r
@@ -75,10 +66,10 @@ EhcDumpStatus (
 \r
 \r
 /**\r
-  Dump the fields of a QTD\r
+  Dump the fields of a QTD.\r
 \r
-  @param  Qtd      The QTD to dump\r
-  @param  Msg      The message to print before the dump\r
+  @param  Qtd      The QTD to dump.\r
+  @param  Msg      The message to print before the dump.\r
 \r
   @return None\r
 \r
@@ -96,7 +87,7 @@ EhcDumpQtd (
     DEBUG ((EFI_D_INFO, Msg));\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "Queue TD @ 0x%x, data length %d\n", Qtd, Qtd->DataLen));\r
+  DEBUG ((EFI_D_INFO, "Queue TD @ 0x%p, data length %d\n", Qtd, (UINT32)Qtd->DataLen));\r
 \r
   QtdHw = &Qtd->QtdHw;\r
 \r
@@ -123,17 +114,17 @@ EhcDumpQtd (
   DEBUG ((EFI_D_INFO, "Data Toggle  : %d\n", QtdHw->DataToggle));\r
 \r
   for (Index = 0; Index < 5; Index++) {\r
-    DEBUG ((EFI_D_INFO, "Page[%d]      : 0x%x\n", Index, QtdHw->Page[Index]));\r
+    DEBUG ((EFI_D_INFO, "Page[%d]      : 0x%x\n", (UINT32)Index, QtdHw->Page[Index]));\r
   }\r
 }\r
 \r
 \r
 /**\r
-  Dump the queue head\r
+  Dump the queue head.\r
 \r
-  @param  Qh       The queue head to dump\r
-  @param  Msg      The message to print before the dump\r
-  @param  DumpBuf  Whether to dump the memory buffer of the associated QTD\r
+  @param  Qh       The queue head to dump.\r
+  @param  Msg      The message to print before the dump.\r
+  @param  DumpBuf  Whether to dump the memory buffer of the associated QTD.\r
 \r
   @return None\r
 \r
@@ -154,8 +145,8 @@ EhcDumpQh (
     DEBUG ((EFI_D_INFO, Msg));\r
   }\r
 \r
-  DEBUG ((EFI_D_INFO, "Queue head @ 0x%x, interval %d, next qh %x\n",\r
-                                Qh, Qh->Interval, Qh->NextQh));\r
+  DEBUG ((EFI_D_INFO, "Queue head @ 0x%p, interval %ld, next qh %p\n",\r
+                                Qh, (UINT64)Qh->Interval, Qh->NextQh));\r
 \r
   QhHw = &Qh->QhHw;\r
 \r
@@ -218,12 +209,12 @@ EhcDumpQh (
 \r
 \r
 /**\r
-  Dump the buffer in the form of hex\r
+  Dump the buffer in the form of hex.\r
 \r
-  @param  Buf      The buffer to dump\r
-  @param  Len      The length of buffer\r
+  @param  Buf      The buffer to dump.\r
+  @param  Len      The length of buffer.\r
 \r
-  @return None\r
+  @return None.\r
 \r
 **/\r
 VOID\r