Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp146994pxb; Fri, 16 Apr 2021 01:50:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYRAQr2YRbBzWboVW8rpssmJsMtGcjk64vkZnmastvD2csRp2zucu400Kx9Z02zCwm5e04 X-Received: by 2002:aa7:d28d:: with SMTP id w13mr8540020edq.251.1618563030628; Fri, 16 Apr 2021 01:50:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618563030; cv=none; d=google.com; s=arc-20160816; b=QI5NEamzoYbT3EAbGkFcGIdcLGmvi1o5inNhyqGH0hiFRIQslkO6FTxG/KgVCxjwXJ C1OYBczABbBw1jxdHi4RpGOuQ34cpeLypoLsDiOSiQaGe0B7bE2PCkI98xYGTOShp0XD 0tBmlLGg8aRyB3QbCe+RDnE3pI7LyAM3Rhc2NcWDy8cvPBydF7N3aVrD2hoGqnOYm5iz OsMu2Re9D3u0OGSl9ux+YtOFD3NId8EQ5WxtbfZoyipe7Zb+pGxhKmEysGbR533Aq3/J 5KqW0j6sMm8UEXSrRwYqMR4xLh8W68ImaFQIUec0aOEIK/exAQ/2KF2BKUc0BpnVrJuy bTUg== 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=ZNHQkvg1hsYB1/dWfc+1kpeziQbBD0J5tBX6QcB4C3lOKzav0yytNoYXa2shNv9pnf 4cmp0JE2sJ8ISHidqMkzAyXo772D+8PfgxhxzBLPB6eSz+CwAurkYr+B4yZKzym8dulu XMvQcF4osE1pupIIITJBkAi2IjHRgFvONOp7SMN3T5Awoh2ROJPLt3XCo9uE8uHilZev NL/zUhKHPbPs/1IIk0fnaP0EONDusxU2t7kVIid7SJkyrn3Gnr9BaGr9x0IJfBEM+Vlc vIqXlZJb0VkrtDl7daCb6tfhiDWxIHuz4UzZp2PkCnEPf7n4vE6YcEkZM9CP/B2LHS34 FVFg== 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 p22si1223423edm.277.2021.04.16.01.50.08; Fri, 16 Apr 2021 01:50:30 -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 S241089AbhDPIsG (ORCPT + 99 others); Fri, 16 Apr 2021 04:48:06 -0400 Received: from mx2.suse.de ([195.135.220.15]:46016 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240862AbhDPIrl (ORCPT ); Fri, 16 Apr 2021 04:47:41 -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 D1865AF33; Fri, 16 Apr 2021 08:47:15 +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 v4 net-next 04/10] net: korina: Remove nested helpers Date: Fri, 16 Apr 2021 10:47:05 +0200 Message-Id: <20210416084712.62561-5-tsbogend@alpha.franken.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210416084712.62561-1-tsbogend@alpha.franken.de> References: <20210416084712.62561-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