remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
Subsystems (2)
PATCH 1/1 remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
Signed-off-by Huawei Xie <[email protected]>
--- 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(-)
drivers/net/virtio/virtio_ethdev.c +5 -7
@@ -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 ; }
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
@@ -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 ; }
drivers/net/vmxnet3/vmxnet3_rxtx.c +1 -1
@@ -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 ;
Signature · 1 line
1.8.1.4
PATCH 1/1 remove redundant __func__ in PMD_INIT_LOG and PMD_RX_LOG
Signed-off-by Huawei Xie <[email protected]>
--- 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(-)
drivers/net/virtio/virtio_ethdev.c +5 -7
@@ -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 ; }
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
@@ -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 ; }
drivers/net/vmxnet3/vmxnet3_rxtx.c +1 -1
@@ -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 ;
Signature · 1 line
1.8.1.4
Quoted 8 lines · On Mon, 28 Dec 2015 01:28:28 +0800 Huawei Xie <[email protected]> wrote:
Signed-off-by Huawei Xie <[email protected]>--- 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(-)
Looks good, probably worth auditing the code for extra newlines as well at some point.
Quoted 12 lines · Stephen Hemminger
Quoted 8 lines · On Mon, 28 Dec 2015 01:28:28 +0800 Huawei Xie <[email protected]> wrote:
Signed-off-by Huawei Xie <[email protected]>--- 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(-)
Quoted 3 lines
Looks good, probably worth auditing the code for extra newlines as well at some point.
Patch split into 2 - one for virtio and one for vmxnet3 - and applied to dpdk-next-net/rel_16_04
/Bruce
Acked-by Yuanhan Liu <[email protected]>
--yliu