[PATCH 5/7] drivers/net: fix unused but set variables

Walsh, Conor conor.walsh at intel.com
Fri Nov 12 17:35:42 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.

Hi Ferruh,

I will rework in v2.

Thanks,
Conor.


More information about the dev mailing list