From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emmanuel Roullit Subject: [PATCH 2/3] net/cxgbe: remove unused variable usage Date: Tue, 24 Jan 2017 21:48:58 +0100 Message-ID: <20170124204859.8998-2-emmanuel.roullit@gmail.com> References: <20170124204859.8998-1-emmanuel.roullit@gmail.com> Cc: dev@dpdk.org To: rahul.lakkireddy@chelsio.com Return-path: Received: from mail-wj0-f195.google.com (mail-wj0-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 6B73C1023 for ; Tue, 24 Jan 2017 21:49:18 +0100 (CET) Received: by mail-wj0-f195.google.com with SMTP id ip10so3235207wjb.1 for ; Tue, 24 Jan 2017 12:49:18 -0800 (PST) In-Reply-To: <20170124204859.8998-1-emmanuel.roullit@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Found with clang static analysis: drivers/net/cxgbe/sge.c:900:3: warning: Value stored to 'in_use' is never read in_use += q->size; ^ ~~~~~~~ Fixes: c167acb61278 ("net/cxgbe: use I/O device memory read/write API") Signed-off-by: Emmanuel Roullit --- drivers/net/cxgbe/sge.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/cxgbe/sge.c b/drivers/net/cxgbe/sge.c index fc03a0c26..42051ca01 100644 --- a/drivers/net/cxgbe/sge.c +++ b/drivers/net/cxgbe/sge.c @@ -891,14 +891,10 @@ static inline int should_tx_packet_coalesce(struct sge_eth_txq *txq, unsigned int flits, ndesc; unsigned char type = 0; int credits, hw_cidx = ntohs(q->stat->cidx); - int in_use = q->pidx - hw_cidx + flits_to_desc(q->coalesce.flits); /* use coal WR type 1 when no frags are present */ type = (mbuf->nb_segs == 1) ? 1 : 0; - if (in_use < 0) - in_use += q->size; - if (unlikely(type != q->coalesce.type && q->coalesce.idx)) ship_tx_pkt_coalesce_wr(adap, txq); -- 2.11.0