lib: minor changes
authorIntel <intel.com>
Tue, 12 Mar 2013 11:03:00 +0000 (12:03 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Thu, 25 Jul 2013 14:07:51 +0000 (16:07 +0200)
Signed-off-by: Intel
lib/librte_eal/common/eal_common_memory.c
lib/librte_eal/common/eal_common_memzone.c
lib/librte_eal/common/include/rte_log.h
lib/librte_mbuf/rte_mbuf.c

index c150705..76eefe9 100644 (file)
@@ -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,
index bcdd95e..47c62b4 100644 (file)
@@ -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;
        }
index 3f697c3..fab9c31 100644 (file)
@@ -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,                                 \
index de85659..d6718ed 100644 (file)
@@ -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;