From patchwork Thu Jul 4 03:37:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 1127337 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming-bpf@patchwork.ozlabs.org Delivered-To: patchwork-incoming-bpf@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=bpf-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=huawei.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 45fNmv58HWz9s8m for ; Thu, 4 Jul 2019 13:31:27 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727063AbfGDDb0 (ORCPT ); Wed, 3 Jul 2019 23:31:26 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8692 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726696AbfGDDb0 (ORCPT ); Wed, 3 Jul 2019 23:31:26 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 45656930A83C8CE4AB25; Thu, 4 Jul 2019 11:31:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.439.0; Thu, 4 Jul 2019 11:31:16 +0800 From: YueHaibing To: Jassi Brar , Alexei Starovoitov , "David S . Miller" , Ilias Apalodimas , Daniel Borkmann , "Jakub Kicinski" , Jesper Dangaard Brouer CC: YueHaibing , , , , Subject: [PATCH v3 net-next] net: socionext: remove set but not used variable 'pkts' Date: Thu, 4 Jul 2019 03:37:45 +0000 Message-ID: <20190704033745.1758-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190704032129.169282-1-yuehaibing@huawei.com> References: <20190704032129.169282-1-yuehaibing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/socionext/netsec.c: In function 'netsec_clean_tx_dring': drivers/net/ethernet/socionext/netsec.c:637:15: warning: variable 'pkts' set but not used [-Wunused-but-set-variable] It is not used since commit ba2b232108d3 ("net: netsec: add XDP support") Signed-off-by: YueHaibing Acked-by: Ilias Apalodimas --- v3: remove misplaced cc in patch log v2: keep reverse christmas-tree ordering of the local variables --- drivers/net/ethernet/socionext/netsec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/socionext/netsec.c b/drivers/net/ethernet/socionext/netsec.c index 5544a722543f..d8d640b01119 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -634,15 +634,14 @@ static void netsec_set_rx_de(struct netsec_priv *priv, static bool netsec_clean_tx_dring(struct netsec_priv *priv) { struct netsec_desc_ring *dring = &priv->desc_ring[NETSEC_RING_TX]; - unsigned int pkts, bytes; struct netsec_de *entry; int tail = dring->tail; + unsigned int bytes; int cnt = 0; if (dring->is_xdp) spin_lock(&dring->lock); - pkts = 0; bytes = 0; entry = dring->vaddr + DESC_SZ * tail;