[dpdk-dev] [PATCH] remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG

Huawei Xie huawei.xie at intel.com
Sun Dec 27 18:28:27 CET 2015


Signed-off-by: Huawei Xie <huawei.xie at intel.com>
---
 drivers/net/virtio/virtio_ethdev.c   | 12 +++++-------
 drivers/net/vmxnet3/vmxnet3_ethdev.c |  6 +++---
 drivers/net/vmxnet3/vmxnet3_rxtx.c   |  2 +-
 3 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index d928339..f19306f 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -150,9 +150,7 @@ virtio_send_command(struct virtqueue *vq, struct virtio_pmd_ctrl *ctrl,
 	ctrl->status = status;
 
 	if (!(vq && vq->hw->cvq)) {
-		PMD_INIT_LOG(ERR,
-			     "%s(): Control queue is not supported.",
-			     __func__);
+		PMD_INIT_LOG(ERR, "Control queue is not supported.");
 		return -1;
 	}
 	head = vq->vq_desc_head_idx;
@@ -306,12 +304,12 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
 	vq_size = VIRTIO_READ_REG_2(hw, VIRTIO_PCI_QUEUE_NUM);
 	PMD_INIT_LOG(DEBUG, "vq_size: %u nb_desc:%u", vq_size, nb_desc);
 	if (vq_size == 0) {
-		PMD_INIT_LOG(ERR, "%s: virtqueue does not exist", __func__);
+		PMD_INIT_LOG(ERR, "virtqueue does not exist");
 		return -EINVAL;
 	}
 
 	if (!rte_is_power_of_2(vq_size)) {
-		PMD_INIT_LOG(ERR, "%s: virtqueue size is not powerof 2", __func__);
+		PMD_INIT_LOG(ERR, "virtqueue size is not powerof 2");
 		return -EINVAL;
 	}
 
@@ -336,7 +334,7 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev,
 			RTE_CACHE_LINE_SIZE);
 	}
 	if (vq == NULL) {
-		PMD_INIT_LOG(ERR, "%s: Can not allocate virtqueue", __func__);
+		PMD_INIT_LOG(ERR, "Can not allocate virtqueue");
 		return (-ENOMEM);
 	}
 	if (queue_type == VTNET_RQ && vq->sw_ring == NULL) {
@@ -1146,7 +1144,7 @@ static int virtio_resource_init_by_ioports(struct rte_pci_device *pci_dev)
 
 	fp = fopen("/proc/ioports", "r");
 	if (fp == NULL) {
-		PMD_INIT_LOG(ERR, "%s(): can't open ioports", __func__);
+		PMD_INIT_LOG(ERR, "can't open ioports");
 		return -1;
 	}
 
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index c363bf6..f5834d6 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -564,7 +564,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 	status = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
 
 	if (status != 0) {
-		PMD_INIT_LOG(ERR, "Device activation in %s(): UNSUCCESSFUL", __func__);
+		PMD_INIT_LOG(ERR, "Device activation: UNSUCCESSFUL");
 		return -1;
 	}
 
@@ -577,7 +577,7 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 	 */
 	ret = vmxnet3_dev_rxtx_init(dev);
 	if (ret != VMXNET3_SUCCESS) {
-		PMD_INIT_LOG(ERR, "Device receive init in %s: UNSUCCESSFUL", __func__);
+		PMD_INIT_LOG(ERR, "Device receive init: UNSUCCESSFUL");
 		return ret;
 	}
 
@@ -882,7 +882,7 @@ vmxnet3_process_events(struct vmxnet3_hw *hw)
 	uint32_t events = hw->shared->ecr;
 
 	if (!events) {
-		PMD_INIT_LOG(ERR, "No events to process in %s()", __func__);
+		PMD_INIT_LOG(ERR, "No events to process");
 		return;
 	}
 
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 4de5d89..e592010 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -462,7 +462,7 @@ vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t *rxq, uint8_t ring_id)
 		/* Allocate blank mbuf for the current Rx Descriptor */
 		mbuf = rte_rxmbuf_alloc(rxq->mp);
 		if (unlikely(mbuf == NULL)) {
-			PMD_RX_LOG(ERR, "Error allocating mbuf in %s", __func__);
+			PMD_RX_LOG(ERR, "Error allocating mbuf");
 			rxq->stats.rx_buf_alloc_failure++;
 			err = ENOMEM;
 			break;
-- 
1.8.1.4



More information about the dev mailing list