From: Bruce Richardson Date: Wed, 12 Feb 2014 16:46:12 +0000 (+0000) Subject: eal: fix printf format X-Git-Tag: spdx-start~11040 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=cac5abc2656142660fcfb5462459536db2a0d681;p=dpdk.git eal: fix printf format Fix some format indicators in printf. Signed-off-by: Bruce Richardson --- diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c index 2bb3f816b0..139b379ea8 100644 --- a/lib/librte_eal/common/eal_common_memory.c +++ b/lib/librte_eal/common/eal_common_memory.c @@ -96,7 +96,7 @@ rte_dump_physmem_layout(void) printf("Segment %u: phys:0x%"PRIx64", len:%zu, " "virt:%p, socket_id:%"PRId32", " - "hugepage_sz:0x%zu, nchannel:%"PRIx32", " + "hugepage_sz:%zu, nchannel:%"PRIx32", " "nrank:%"PRIx32"\n", i, mcfg->memseg[i].phys_addr, mcfg->memseg[i].len, diff --git a/lib/librte_eal/common/eal_common_memzone.c b/lib/librte_eal/common/eal_common_memzone.c index 4f9be24497..bb5cfd3260 100644 --- a/lib/librte_eal/common/eal_common_memzone.c +++ b/lib/librte_eal/common/eal_common_memzone.c @@ -321,7 +321,7 @@ rte_memzone_dump(void) for (i=0; imemzone[i].addr == NULL) break; - printf("Zone %o: name:<%s>, phys:0x%"PRIx64", len:0x%zx" + printf("Zone %u: name:<%s>, phys:0x%"PRIx64", len:0x%zx" ", virt:%p, socket_id:%"PRId32", flags:%"PRIx32"\n", i, mcfg->memzone[i].name, mcfg->memzone[i].phys_addr, diff --git a/lib/librte_eal/common/eal_common_tailqs.c b/lib/librte_eal/common/eal_common_tailqs.c index 0c51b90008..e98903d382 100644 --- a/lib/librte_eal/common/eal_common_tailqs.c +++ b/lib/librte_eal/common/eal_common_tailqs.c @@ -120,7 +120,7 @@ rte_dump_tailq(void) const struct rte_tailq_head *tailq = &mcfg->tailq_head[i]; const struct rte_dummy_head *head = &tailq->tailq_head; - printf("Tailq %o: qname:<%s>, tqh_first:%p, tqh_last:%p\n", i, + printf("Tailq %u: qname:<%s>, tqh_first:%p, tqh_last:%p\n", i, (rte_tailq_names[i] != NULL ? rte_tailq_names[i]:"nil"), head->tqh_first, head->tqh_last); } diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index f008dfa204..f5b6b054e7 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -343,9 +343,10 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, (dev_conf->rxmode.mq_mode == ETH_MQ_RX_DCB_RSS) || (dev_conf->txmode.mq_mode == ETH_MQ_TX_DCB)) { /* SRIOV only works in VMDq enable mode */ - PMD_DEBUG_TRACE("ethdev port_id=%d SRIOV active, " - "wrong VMDQ mq_mode rx %d tx %d\n", - port_id, dev_conf->rxmode.mq_mode, + PMD_DEBUG_TRACE("ethdev port_id=%hhu SRIOV active, " + "wrong VMDQ mq_mode rx %u tx %u\n", + port_id, + dev_conf->rxmode.mq_mode, dev_conf->txmode.mq_mode); return (-EINVAL); } @@ -355,8 +356,8 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, case ETH_MQ_RX_VMDQ_DCB: case ETH_MQ_RX_VMDQ_DCB_RSS: /* DCB/RSS VMDQ in SRIOV mode, not implement yet */ - PMD_DEBUG_TRACE("ethdev port_id=%d SRIOV active, " - "unsupported VMDQ mq_mode rx %d\n", + PMD_DEBUG_TRACE("ethdev port_id=%hhu SRIOV active, " + "unsupported VMDQ mq_mode rx %u\n", port_id, dev_conf->rxmode.mq_mode); return (-EINVAL); default: /* ETH_MQ_RX_VMDQ_ONLY or ETH_MQ_RX_NONE */ @@ -370,8 +371,8 @@ rte_eth_dev_check_mq_mode(uint8_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, switch (dev_conf->txmode.mq_mode) { case ETH_MQ_TX_VMDQ_DCB: /* DCB VMDQ in SRIOV mode, not implement yet */ - PMD_DEBUG_TRACE("ethdev port_id=%d SRIOV active, " - "unsupported VMDQ mq_mode tx %d\n", + PMD_DEBUG_TRACE("ethdev port_id=%hhu SRIOV active, " + "unsupported VMDQ mq_mode tx %u\n", port_id, dev_conf->txmode.mq_mode); return (-EINVAL); default: /* ETH_MQ_TX_VMDQ_ONLY or ETH_MQ_TX_NONE */ diff --git a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c index 01c69e92e2..c29fbea149 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_ethdev.c +++ b/lib/librte_pmd_ixgbe/ixgbe_ethdev.c @@ -711,7 +711,8 @@ eth_ixgbe_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, hw->mac.num_rar_entries, 0); if (eth_dev->data->mac_addrs == NULL) { PMD_INIT_LOG(ERR, - "Failed to allocate %d bytes needed to store MAC addresses", + "Failed to allocate %u bytes needed to store " + "MAC addresses", ETHER_ADDR_LEN * hw->mac.num_rar_entries); return -ENOMEM; } @@ -844,7 +845,8 @@ eth_ixgbevf_dev_init(__attribute__((unused)) struct eth_driver *eth_drv, hw->mac.num_rar_entries, 0); if (eth_dev->data->mac_addrs == NULL) { PMD_INIT_LOG(ERR, - "Failed to allocate %d bytes needed to store MAC addresses", + "Failed to allocate %u bytes needed to store " + "MAC addresses", ETHER_ADDR_LEN * hw->mac.num_rar_entries); return -ENOMEM; } @@ -1245,7 +1247,7 @@ ixgbe_dev_start(struct rte_eth_dev *dev) /* IXGBE devices don't support half duplex */ if ((dev->data->dev_conf.link_duplex != ETH_LINK_AUTONEG_DUPLEX) && (dev->data->dev_conf.link_duplex != ETH_LINK_FULL_DUPLEX)) { - PMD_INIT_LOG(ERR, "Invalid link_duplex (%u) for port %u\n", + PMD_INIT_LOG(ERR, "Invalid link_duplex (%hu) for port %hhu\n", dev->data->dev_conf.link_duplex, dev->data->port_id); return -EINVAL; @@ -1313,8 +1315,9 @@ ixgbe_dev_start(struct rte_eth_dev *dev) speed = IXGBE_LINK_SPEED_10GB_FULL; break; default: - PMD_INIT_LOG(ERR, "Invalid link_speed (%u) for port %u\n", - dev->data->dev_conf.link_speed, dev->data->port_id); + PMD_INIT_LOG(ERR, "Invalid link_speed (%hu) for port %hhu\n", + dev->data->dev_conf.link_speed, + dev->data->port_id); goto error; }