Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp913616ybl; Wed, 28 Aug 2019 07:08:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbryBKtlLdp3L+KJ8MJFiVkVSqr7l6mFhT/LmPXj7X+RhO/PF06VZ92MiiLM2CePysXmc8 X-Received: by 2002:a63:d30f:: with SMTP id b15mr3555056pgg.341.1567001328359; Wed, 28 Aug 2019 07:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567001328; cv=none; d=google.com; s=arc-20160816; b=CAoUJ1iO4NUwm0tyY8Ey1UZ17qqrjbCsaVFgg3M5G4Z5Yg8H44nwAYeHiBZaQJf19X dUujG8I8UCexC2f0lPIT92gmx2mua9G8MZhWhIlFnOFm0cdV8F7Pmwl8g7RTyBxoW3lX XdiS7uP2HKKcCrO25OoVzd91I15J5efcIJ6Rg7gFY/URywG2RYGEeOxayg5lxysh0hSA 2pZWWRRVJEGJdGo6nEVIWzT46R8EF+HwW+911n+wwgC090b3hNz1FNHLya0OMQdp2ETK Br4kWugf512ZYAWMoBnZuKeKy2bsk23F1Uab1G208NlI4YMQodqYVJCKPcCeSTRA3jLV MgyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from; bh=5bCIaR/Bw6P5m94EGeXnZ2Rf5+BPFtpzoOPQptHeAqc=; b=E3jP0HTazg8mq1xn/uN8sJRU5jV/eh/PwztxHQL89f32m1Ro1/qJr6z31afawyfym1 lLrYqSrLnPUrN6olnQvQSjw2+RJoVCcX3BdfhkTfRdrm53vn5oWeYlkYs/YRA4tOsmdh XJwFbt2y0a3rmssvlUUvMtY7R0ngZI+nqNRwB8/YanMM/BYeypvISNzsi1ZhgSmaAO6n B/RDDlUiOqZaOBTV1VTq/HuTa4Z46I42vyW5pI/LlP3L1Ag3ay64eF9pQ5Fkw2qdOtNS PARKzAKHU74u8lEjlrAC8RnDzqANLgji/RuphnVYX9F5ablprsN/zWYXUiXjVaRxJ+WL PO1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ds20si1951504pjb.9.2019.08.28.07.08.29; Wed, 28 Aug 2019 07:08:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727595AbfH1OEs (ORCPT + 99 others); Wed, 28 Aug 2019 10:04:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:39678 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726725AbfH1ODc (ORCPT ); Wed, 28 Aug 2019 10:03:32 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 129F1B64B; Wed, 28 Aug 2019 14:03:31 +0000 (UTC) From: Thomas Bogendoerfer To: Ralf Baechle , Paul Burton , James Hogan , "David S. Miller" , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next 06/15] net: sgi: ioc3-eth: get rid of ioc3_clean_rx_ring() Date: Wed, 28 Aug 2019 16:03:05 +0200 Message-Id: <20190828140315.17048-7-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20190828140315.17048-1-tbogendoerfer@suse.de> References: <20190828140315.17048-1-tbogendoerfer@suse.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Clean rx ring is just called once after a new ring is allocated, which is per definition clean. So there is not need for this function. Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/sgi/ioc3-eth.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/drivers/net/ethernet/sgi/ioc3-eth.c b/drivers/net/ethernet/sgi/ioc3-eth.c index 6ca560d4ab79..39631e067b71 100644 --- a/drivers/net/ethernet/sgi/ioc3-eth.c +++ b/drivers/net/ethernet/sgi/ioc3-eth.c @@ -761,26 +761,6 @@ static void ioc3_mii_start(struct ioc3_private *ip) add_timer(&ip->ioc3_timer); } -static inline void ioc3_clean_rx_ring(struct ioc3_private *ip) -{ - struct ioc3_erxbuf *rxb; - struct sk_buff *skb; - int i; - - for (i = ip->rx_ci; i & 15; i++) { - ip->rx_skbs[ip->rx_pi] = ip->rx_skbs[ip->rx_ci]; - ip->rxr[ip->rx_pi++] = ip->rxr[ip->rx_ci++]; - } - ip->rx_pi &= RX_RING_MASK; - ip->rx_ci &= RX_RING_MASK; - - for (i = ip->rx_ci; i != ip->rx_pi; i = (i + 1) & RX_RING_MASK) { - skb = ip->rx_skbs[i]; - rxb = (struct ioc3_erxbuf *)(skb->data - RX_OFFSET); - rxb->w0 = 0; - } -} - static inline void ioc3_clean_tx_ring(struct ioc3_private *ip) { struct sk_buff *skb; @@ -860,7 +840,6 @@ static void ioc3_init_rings(struct net_device *dev) ioc3_free_rings(ip); ioc3_alloc_rings(dev); - ioc3_clean_rx_ring(ip); ioc3_clean_tx_ring(ip); /* Now the rx ring base, consume & produce registers. */ -- 2.13.7