Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp148351pxb; Fri, 16 Apr 2021 01:53:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5wXJfFPrLG1abqwWkw/PPeCanY9dC7MBmGhJul9BmsOE5vXycqilfbKNp9TV/oSoh29FS X-Received: by 2002:a17:906:86c2:: with SMTP id j2mr7238941ejy.257.1618563236401; Fri, 16 Apr 2021 01:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618563236; cv=none; d=google.com; s=arc-20160816; b=Fs9iNgHJm7ngeURhxgyX50ZiJxBvxTwKWtPR7uCiZw3lhO6nvdhUba6llFB5Xgbo35 EstHjCa+Cy4dzvdtGJ6SwXCSZsNLihw3rmOUARpwlX8a5gYII7jVlK2wm3by1yx7s/xi Eskcj1MzUPIV8LQI/F/5nAC/1d8lKMUYSUtZmllS4PWsGyhD1AggCCW19KPcch0x7PIj +7WiIAfgpA5CeidZhSK2l9TgBWL6reCp/Qv7RKELA4DsTNm1RYNCQHVr3xlkRnpwy/dw OYO+S9/sCZO4gXT0h16nc/FEDY7Ukw0DSGyycp1L639TygTd3pAMxwW+yZtltfDrP1YI Zofw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=6Tg2ooJMnZbqVmJp98PhvADpzf+UHfOkOANA4C45ip4=; b=ocFFhzUVTs72YXpgpBx7Ec2b3XiCEivQUuBCdaxoM6poPd3RjG26BVuMzpv2ucoRU7 CqkeP+30LFk4qO87ui7alS7GpcX2m3rZuPSR5G4QE0WB/KaPTZ+rfYT1RZ9DF8OF1Css TkckKVqtsLoUdw/M9d5ogkvb7S4jYNeW5503CMrodsnbkDML4U/ZbpYPGKLV46QDQy6Q j21Dbkg4hKoxzJWhKLrutjjP7CoF8StBG/xk8Zp7exCpbdpOJymCfmAVZe+AoCv4ciQp ajbAAGfD88OIHaFEYEIL8HnaRtnpwV4vjTF/5/a14vXi5r8b3A4OArZAN09Q0fO6fqmt LxoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si4327149ejv.549.2021.04.16.01.53.33; Fri, 16 Apr 2021 01:53:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241368AbhDPIwv (ORCPT + 99 others); Fri, 16 Apr 2021 04:52:51 -0400 Received: from mx2.suse.de ([195.135.220.15]:54030 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240825AbhDPIwh (ORCPT ); Fri, 16 Apr 2021 04:52:37 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 47E42AF28; Fri, 16 Apr 2021 08:52:12 +0000 (UTC) From: Thomas Bogendoerfer To: "David S. Miller" , Jakub Kicinski , Rob Herring , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org Cc: Andrew Lunn Subject: [PATCH v5 net-next 04/10] net: korina: Remove nested helpers Date: Fri, 16 Apr 2021 10:52:00 +0200 Message-Id: <20210416085207.63181-5-tsbogend@alpha.franken.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210416085207.63181-1-tsbogend@alpha.franken.de> References: <20210416085207.63181-1-tsbogend@alpha.franken.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove helpers, which are only used in one call site. Reviewed-by: Andrew Lunn Signed-off-by: Thomas Bogendoerfer --- drivers/net/ethernet/korina.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index c7abb4a8dd37..955fe3d3da06 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c @@ -142,12 +142,6 @@ struct korina_private { extern unsigned int idt_cpu_freq; -static inline void korina_start_dma(struct dma_reg *ch, u32 dma_addr) -{ - writel(0, &ch->dmandptr); - writel(dma_addr, &ch->dmadptr); -} - static inline void korina_abort_dma(struct net_device *dev, struct dma_reg *ch) { @@ -164,11 +158,6 @@ static inline void korina_abort_dma(struct net_device *dev, writel(0, &ch->dmandptr); } -static inline void korina_chain_dma(struct dma_reg *ch, u32 dma_addr) -{ - writel(dma_addr, &ch->dmandptr); -} - static void korina_abort_tx(struct net_device *dev) { struct korina_private *lp = netdev_priv(dev); @@ -183,18 +172,6 @@ static void korina_abort_rx(struct net_device *dev) korina_abort_dma(dev, lp->rx_dma_regs); } -static void korina_start_rx(struct korina_private *lp, - struct dma_desc *rd) -{ - korina_start_dma(lp->rx_dma_regs, CPHYSADDR(rd)); -} - -static void korina_chain_rx(struct korina_private *lp, - struct dma_desc *rd) -{ - korina_chain_dma(lp->rx_dma_regs, CPHYSADDR(rd)); -} - /* transmit packet */ static int korina_send_packet(struct sk_buff *skb, struct net_device *dev) { @@ -463,7 +440,7 @@ static int korina_rx(struct net_device *dev, int limit) rd->devcs = 0; skb = lp->rx_skb[lp->rx_next_done]; rd->ca = CPHYSADDR(skb->data); - korina_chain_rx(lp, rd); + writel(CPHYSADDR(rd), &lp->rx_dma_regs->dmandptr); } return count; @@ -840,7 +817,8 @@ static int korina_init(struct net_device *dev) writel(0, &lp->rx_dma_regs->dmas); /* Start Rx DMA */ - korina_start_rx(lp, &lp->rd_ring[0]); + writel(0, &lp->rx_dma_regs->dmandptr); + writel(CPHYSADDR(&lp->rd_ring[0]), &lp->rx_dma_regs->dmadptr); writel(readl(&lp->tx_dma_regs->dmasm) & ~(DMA_STAT_FINI | DMA_STAT_ERR), -- 2.29.2