diff mbox series

[v2,10/30] common/dpaax: reduce debug mesages

Message ID 20190829102737.13267-11-sachin.saxena@nxp.com
State New
Headers show
Series [v2,01/30] bus/dpaa: fix DPAA SEC blacklist case | expand

Commit Message

Sachin Saxena Aug. 29, 2019, 10:27 a.m. UTC
From: Hemant Agrawal <hemant.agrawal@nxp.com>


Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>

Reviewed-by: Sachin Saxena <sachin.saxena@nxp.com>

---
 drivers/common/dpaax/dpaax_iova_table.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

-- 
2.17.1
diff mbox series

Patch

diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index ae0af0919..43c9c72e6 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -140,7 +140,8 @@  read_memory_node(unsigned int *count)
 
 	DPAAX_DEBUG("Device-tree memory node data:");
 	do {
-		DPAAX_DEBUG("\n    %08" PRIx64 " %08zu", nodes[j].addr, nodes[j].len);
+		DPAAX_DEBUG("    %08" PRIx64 " %08zu",
+			    nodes[j].addr, nodes[j].len);
 	} while (--j);
 
 cleanup:
@@ -241,7 +242,7 @@  dpaax_iova_table_populate(void)
 	/* Release memory associated with nodes array - not required now */
 	free(nodes);
 
-	DPAAX_DEBUG("Adding mem-event handler\n");
+	DPAAX_DEBUG("Adding mem-event handler");
 	ret = dpaax_handle_memevents();
 	if (ret) {
 		DPAAX_ERR("Unable to add mem-event handler");
@@ -306,10 +307,11 @@  dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length)
 			 * case.
 			 */
 			entry[i].pages[e_offset] = align_vaddr;
+#ifdef RTE_COMMON_DPAAX_DEBUG
 			DPAAX_DEBUG("Added: vaddr=%zu for Phy:%"PRIu64" at %zu"
 				    " remaining len %zu", align_vaddr,
 				    align_paddr, e_offset, req_length);
-
+#endif
 			/* Incoming request can be larger than the
 			 * DPAAX_MEM_SPLIT size - in which case, multiple
 			 * entries in entry->pages[] are filled up.
@@ -336,10 +338,11 @@  dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length)
 			    vaddr, paddr);
 		return -1;
 	}
-
+#ifdef RTE_COMMON_DPAAX_DEBUG
 	DPAAX_DEBUG("Add: Found slot at (%"PRIu64")[(%zu)] for vaddr:(%p),"
 		    " phy(%"PRIu64"), len(%zu)", entry[i].start, e_offset,
 		    vaddr, paddr, length);
+#endif
 	return 0;
 }
 
@@ -404,13 +407,13 @@  dpaax_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
 		phys_addr = rte_mem_virt2phy(ms->addr);
 		virt_addr = ms->addr;
 		map_len = ms->len;
-
+#ifdef RTE_COMMON_DPAAX_DEBUG
 		DPAAX_DEBUG("Request for %s, va=%p, virt_addr=%p,"
 			    "iova=%"PRIu64", map_len=%zu",
 			    type == RTE_MEM_EVENT_ALLOC ?
 			    "alloc" : "dealloc",
 			    va, virt_addr, phys_addr, map_len);
-
+#endif
 		if (type == RTE_MEM_EVENT_ALLOC)
 			ret = dpaax_iova_table_update(phys_addr, virt_addr,
 						      map_len);