[PATCH 5/7] drivers/net: fix unused but set variables
Ferruh Yigit
ferruh.yigit at intel.com
Fri Nov 12 17:17:44 CET 2021
On 11/12/2021 2:01 PM, Conor Walsh wrote:
> static void
> vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *txq)
> {
> + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> int completed = 0;
> + #endif
> vmxnet3_comp_ring_t *comp_ring = &txq->comp_ring;
> struct Vmxnet3_TxCompDesc *tcd = (struct Vmxnet3_TxCompDesc *)
> (comp_ring->base + comp_ring->next2proc);
>
> while (tcd->gen == comp_ring->gen) {
> + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> completed += vmxnet3_unmap_pkt(tcd->txdIdx, txq);
> + #endif
>
> vmxnet3_comp_ring_adv_next2proc(comp_ring);
> tcd = (struct Vmxnet3_TxCompDesc *)(comp_ring->base +
> comp_ring->next2proc);
> }
>
> + #ifdef RTE_LIBRTE_VMXNET3_DEBUG_TX
> PMD_TX_LOG(DEBUG, "Processed %d tx comps & command descs.", completed);
> + #endif
> }
'PMD_TX_LOG' doesn't require 'RTE_LIBRTE_VMXNET3_DEBUG_TX' wrap.
More information about the dev
mailing list