From c662f30dbe45c0827261d42b8082d73ab9b2be8e Mon Sep 17 00:00:00 2001 From: Intel Date: Tue, 12 Mar 2013 12:03:00 +0100 Subject: [PATCH] lib: minor changes Signed-off-by: Intel --- lib/librte_eal/common/eal_common_memory.c | 2 +- lib/librte_eal/common/eal_common_memzone.c | 4 +++- lib/librte_eal/common/include/rte_log.h | 2 +- lib/librte_mbuf/rte_mbuf.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c index c150705bed..76eefe99c4 100644 --- a/lib/librte_eal/common/eal_common_memory.c +++ b/lib/librte_eal/common/eal_common_memory.c @@ -95,7 +95,7 @@ rte_dump_physmem_layout(void) if (mcfg->memseg[i].addr == NULL) break; - printf("Segment %o: phys:0x%"PRIx64", len:0x%"PRIx64", " + printf("Segment %u: phys:0x%"PRIx64", len:0x%"PRIx64", " "virt:%p, socket_id:%"PRId32", " "hugepage_sz:0x%"PRIx64", nchannel:%"PRIx32", " "nrank:%"PRIx32"\n", i, diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c index bcdd95e203..47c62b4932 100644 --- a/lib/librte_eal/common/eal_common_memzone.c +++ b/lib/librte_eal/common/eal_common_memzone.c @@ -198,7 +198,9 @@ memzone_reserve_aligned_thread_unsafe(const char *name, uint64_t len, return memzone_reserve_aligned_thread_unsafe(name, len - align, socket_id, 0, align); - RTE_LOG(ERR, EAL, "%s(): No appropriate segment found\n", __func__); + RTE_LOG(ERR, EAL, "%s(%s, %" PRIu64 ", %d): " + "No appropriate segment found\n", + __func__, name, requested_len, socket_id); rte_errno = ENOMEM; return NULL; } diff --git a/lib/librte_eal/common/include/rte_log.h b/lib/librte_eal/common/include/rte_log.h index 3f697c3db2..fab9c31e6d 100644 --- a/lib/librte_eal/common/include/rte_log.h +++ b/lib/librte_eal/common/include/rte_log.h @@ -276,7 +276,7 @@ int rte_vlog(uint32_t level, uint32_t logtype, const char *format, va_list ap); * - Negative on error. */ #define RTE_LOG(l, t, ...) \ - (((RTE_LOG_ ## l <= RTE_LOG_LEVEL) && \ + (void)(((RTE_LOG_ ## l <= RTE_LOG_LEVEL) && \ (RTE_LOG_ ## l <= rte_logs.level) && \ (RTE_LOGTYPE_ ## t & rte_logs.type)) ? \ rte_log(RTE_LOG_ ## l, \ diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index de8565988c..d6718ed9b7 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -229,7 +229,7 @@ rte_pktmbuf_dump(const struct rte_mbuf *m, unsigned dump_len) printf("dump mbuf at 0x%p, phys=%"PRIx64", buf_len=%u\n", m, (uint64_t)m->buf_physaddr, (unsigned)m->buf_len); - printf(" pkt_len=%"PRIx32", ol_flags=%"PRIx16", nb_segs=%u, " + printf(" pkt_len=%"PRIu32", ol_flags=%"PRIx16", nb_segs=%u, " "in_port=%u\n", m->pkt.pkt_len, m->ol_flags, (unsigned)m->pkt.nb_segs, (unsigned)m->pkt.in_port); nb_segs = m->pkt.nb_segs; -- 2.20.1