Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2713221imw; Sun, 17 Jul 2022 15:23:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sWIWWWZGHY6V7BkQN+UxnPisQHGqnPTbxTqclxV4+oRCt4mgGYP4ImnRS4ElJOxC11Xwy+ X-Received: by 2002:a05:6402:3301:b0:43a:9ad4:633 with SMTP id e1-20020a056402330100b0043a9ad40633mr34946009eda.261.1658096584658; Sun, 17 Jul 2022 15:23:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658096584; cv=none; d=google.com; s=arc-20160816; b=MSBzv2Z6chEfmV7lYUpw+x4cUdFdINwXoA/BTIF3wn4RXDYPiidP4rsX64YbGrYmdw 0NF5gPMoY69yi8AfCaq28jDh7RIk+gE6tNnDg8kbK3DoQ/ZkgiDHVQDBZ06tIyaDNt3D oodAhxc3wFK8Bp+Ge9QIiDOVpTJjrcL2AiH2gXcKzU8szsDtWuah98gyl021Jf99jH1P Whmxw+dIQzaZTHv+vxTtHyeisFY3fYuQ+qea95XvOM4P0FrT9HlYTvgqRLMEkKajLXZ5 guiYBGcSX2tQFdspi2s+HrZjzrPpgpuXG+/rfJgK7cl20TnRHBYAYX4cAF1F+gjqrL3Y 7GAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date:dkim-signature; bh=CS/R4BBOiK/7PZe73tLvElDqF+cKw+/gEyRw36JfpCc=; b=TeycSPcOZ2hl265tJRcNPa1mIdJO0nhcKracgdi1IO5O8PBkhzF5lNyUrY8cwUweZO kcQ95zXYcsRaPP50qOLY2zpsXu2gXDAPZpHQQI/8kdqhBvACDQ16o40H7ZPP9KMU2ZKZ bN+5vhgd20xS4Kbaumjbky2Z7g1jw7tIDZUIujwAbZzn/wOkZ54QwtgJYNBYU0Ou/h2c 5uyVGWYrJubECW8Etx2C+9Qf9C/8n18saHfw2PaW1na0h3kjtf0ttOpv34uIf8xVnSTX EoXO4BFIva1GJUaM6sUasvQAYq80qCJfxmSe9etipPrNqVq8tISHp03B367mm4jQrGcq xtew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MWAXpn5n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du6-20020a17090772c600b0072f0e2449e1si8561363ejc.723.2022.07.17.15.22.40; Sun, 17 Jul 2022 15:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=MWAXpn5n; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231611AbiGQWUb (ORCPT + 99 others); Sun, 17 Jul 2022 18:20:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231296AbiGQWU1 (ORCPT ); Sun, 17 Jul 2022 18:20:27 -0400 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89E0112AC8 for ; Sun, 17 Jul 2022 15:20:25 -0700 (PDT) Received: by mail-ed1-x52d.google.com with SMTP id z22so95847edd.6 for ; Sun, 17 Jul 2022 15:20:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CS/R4BBOiK/7PZe73tLvElDqF+cKw+/gEyRw36JfpCc=; b=MWAXpn5nsIZh8pGmb2NsgT4fEYy+1zmp2gxD9Wpzz1OzoZAD17GAtDydbKj6ACLFKy tDBmm1EIlKl9SBBDpH6sSE+txzuZVlDS6ZuH9HiDRQbmXFlks6K0flkH32Byavjvo6qR 3WzstgE0a1kLsdrC1ahHA4qognmTNqat77FTV6CkXbMRY7GsbW/5SAsSwV5/o1ziLEU8 mvfXDnj1eDpirND6XgyQSIqJ/2imykM5NbrkjGbqrNEOQajhj/cr71XUfe2U3TaLRsXN /4KCSXUtXP5Pkme1xPhoIvw5BMZ7NByGR/oOdAYLqwxU/0OqP5TdpJd6rcBqdvEFSMg0 8Gxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CS/R4BBOiK/7PZe73tLvElDqF+cKw+/gEyRw36JfpCc=; b=qoLc/vu3vxP4dT6Nt1c0X9DIHbrZUeWGLHlatL7V7ueUaZn/5OGNEubErTHJVgrZ3Q qoYxsC9XSkLXkgiqCgopTsfGraEdQ/bMXaO75hYvNG4C2eOXmFn3reNV2fTdG4liKy6n CtIFrehCxW36pGwCjbqelOWG0G4GGVrEGdZ37UjwGMzsFTShColG3zDhGh8E+dET3dXo BAUHROLztT8JOMtRPEyA+nG3N7kmazMtFOwAVTchCH8sKMbU6bO2uMLNHhD42Zl4Nbyr gKvzXYBnl4TBkA6qoSQc7dxsikNAQcvDqjzqXZBm3XfnIZ4TUe2LvL9EnLPWif1rH1v/ gwOg== X-Gm-Message-State: AJIora9oGthnMOhRCTUUER1nAPyyJ8UB40xaicS/T3qqMxvQRkX6CQ2v jWl3Zn+qknlVEG2+DEA3GDk= X-Received: by 2002:a05:6402:5418:b0:435:5a48:daa9 with SMTP id ev24-20020a056402541800b004355a48daa9mr33682976edb.304.1658096423688; Sun, 17 Jul 2022 15:20:23 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p54a07b82.dip0.t-ipconnect.de. [84.160.123.130]) by smtp.gmail.com with ESMTPSA id kw5-20020a170907770500b0072f07213509sm3178268ejc.12.2022.07.17.15.20.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 15:20:23 -0700 (PDT) Date: Mon, 18 Jul 2022 00:20:21 +0200 From: Philipp Hortmann To: Forest Bond , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 4/7] staging: vt6655: Add parameter to function vt6655_mac_dma_ctl Message-ID: <476d9023863899ebd6f515e6a5c9022c9fd64d84.1658094708.git.philipp.g.hortmann@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add one parameter to avoid multiple repetitions of the same macro/function. Signed-off-by: Philipp Hortmann --- drivers/staging/vt6655/device_main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index cf25644f8671..31e0e55b9220 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -125,7 +125,7 @@ static void device_print_info(struct vnt_private *priv); static void vt6655_mac_write_bssid_addr(void __iomem *iobase, const u8 *mac_addr); static void vt6655_mac_read_ether_addr(void __iomem *iobase, u8 *mac_addr); -static void vt6655_mac_dma_ctl(void __iomem *iobase); +static void vt6655_mac_dma_ctl(void __iomem *iobase, u8 reg_index); static int device_init_rd0_ring(struct vnt_private *priv); static int device_init_rd1_ring(struct vnt_private *priv); @@ -207,15 +207,15 @@ static void vt6655_mac_read_ether_addr(void __iomem *iobase, u8 *mac_addr) iowrite8(0, iobase + MAC_REG_PAGE1SEL); } -static void vt6655_mac_dma_ctl(void __iomem *iobase) +static void vt6655_mac_dma_ctl(void __iomem *iobase, u8 reg_index) { unsigned long reg_value; - reg_value = ioread32(iobase + MAC_REG_RXDMACTL0); + reg_value = ioread32(iobase + reg_index); if (reg_value & DMACTL_RUN) - iowrite32(DMACTL_WAKE, iobase + MAC_REG_RXDMACTL0); + iowrite32(DMACTL_WAKE, iobase + reg_index); else - iowrite32(DMACTL_RUN, iobase + MAC_REG_RXDMACTL0); + iowrite32(DMACTL_RUN, iobase + reg_index); } /* @@ -433,7 +433,7 @@ static void device_init_registers(struct vnt_private *priv) vt6655_mac_reg_bits_on(priv->port_offset, MAC_REG_RCR, RCR_WPAERR); /* Turn On Rx DMA */ - vt6655_mac_dma_ctl(priv->port_offset); + vt6655_mac_dma_ctl(priv->port_offset, MAC_REG_RXDMACTL0); MACvReceive1(priv->port_offset); /* start the adapter */ @@ -1148,7 +1148,7 @@ static void vnt_interrupt_process(struct vnt_private *priv) isr = ioread32(priv->port_offset + MAC_REG_ISR); - vt6655_mac_dma_ctl(priv->port_offset); + vt6655_mac_dma_ctl(priv->port_offset, MAC_REG_RXDMACTL0); MACvReceive1(priv->port_offset); if (max_count > priv->opts.int_works) -- 2.37.1