From patchwork Wed Jul 3 02:42:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 1126580 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming-netdev@ozlabs.org Delivered-To: patchwork-incoming-netdev@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=netdev-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 45dlbF0Crkz9s4V for ; Wed, 3 Jul 2019 12:35:53 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727479AbfGCCfv (ORCPT ); Tue, 2 Jul 2019 22:35:51 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8688 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727144AbfGCCfv (ORCPT ); Tue, 2 Jul 2019 22:35:51 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 114BFA93318A16B54761; Wed, 3 Jul 2019 10:35:47 +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; Wed, 3 Jul 2019 10:35:40 +0800 From: YueHaibing To: Jassi Brar , Alexei Starovoitov , "David S . Miller" , Ilias Apalodimas , Daniel Borkmann , "Jakub Kicinski" , Jesper Dangaard Brouer CC: YueHaibing , , , , Subject: [PATCH net-next] net: socionext: remove set but not used variable 'pkts' Date: Wed, 3 Jul 2019 02:42:13 +0000 Message-ID: <20190703024213.191191-1-yuehaibing@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@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 --- 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..015d1ec5436a 100644 --- a/drivers/net/ethernet/socionext/netsec.c +++ b/drivers/net/ethernet/socionext/netsec.c @@ -634,7 +634,7 @@ 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; + unsigned int bytes; struct netsec_de *entry; int tail = dring->tail; int cnt = 0; @@ -642,7 +642,6 @@ static bool netsec_clean_tx_dring(struct netsec_priv *priv) if (dring->is_xdp) spin_lock(&dring->lock); - pkts = 0; bytes = 0; entry = dring->vaddr + DESC_SZ * tail;