Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp2713037imw; Sun, 17 Jul 2022 15:22:45 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v28DjWqhA2Rbu2azBG3hR+6DxrfHJ2otjpABtxbSViLEpLcgesEwyBaLvO096TDDfLjqxk X-Received: by 2002:a05:6402:355:b0:43a:4f13:56d2 with SMTP id r21-20020a056402035500b0043a4f1356d2mr32937999edw.312.1658096564838; Sun, 17 Jul 2022 15:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658096564; cv=none; d=google.com; s=arc-20160816; b=oEp4xmrScOBb9sHFC5qD5ngiDlqnQzpJFp9N6Hmpbn6UmBPgZYrin6RSeW009FmZvj z/ktRjnZYMlNu/B1clVYcfOcR589POTmDXkob9wZkcfXBnMhnKGjPxQDfOy3Rf9CpwlS TMktTMRFCExOmFVpv0VgBJ3pBJJFHYXYSB0NdXlafmM70V5atjx+cTEgSYbU+0M7SmnP P4rsU4edZOpguc68VYc3osuetw1pZbdqAWvUJ5Nrg+al7LIkFRORCwkUWaU6lEqwgzzn 2MFlWzD4E923+bD70SdA/qX98E+3k/atlXtBf+FkAqJkjhEBODqos/T1QzTUtiPsWRNg I9DA== 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=En7+TVW64zRoyWuupOH6lOq4ewhG8jBuFQhAW9bo4EA=; b=grLptK1iCOv8x4faMvNkOftztq0e0N4le85Xl1usTC3lrMKON0GjvAQpUMXTDKvFQE vr0hCSvdy1KdsAwGlxmoIcqQdQfQVWybs+bMTs4lY10G7weuIAP6a7reI5lPemLgu/bz SzirdGoSb5Xz3laZAjenzCxvkcghR/a+KDiPFQg/9h0+FEByzZx20R9ioHvkWneKpuc4 51ucrrPoSd3sc1uItmUEo1yaf9Bab1zGxpGFYW0nIfU9x5kfWwo2a89FiHwenkAmltVm /RuhMDBWL4Sok2UW/A+0Chsy7dVdm9SkGON1H/1IqK5O8dW8BA3R3Y/EXmXWJRqoHxE7 fJCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LGJfl36f; 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 oz8-20020a1709077d8800b006e8c309996esi14836389ejc.551.2022.07.17.15.22.20; Sun, 17 Jul 2022 15:22:44 -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=LGJfl36f; 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 S230080AbiGQWU0 (ORCPT + 99 others); Sun, 17 Jul 2022 18:20:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231300AbiGQWUX (ORCPT ); Sun, 17 Jul 2022 18:20:23 -0400 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B64E1274F for ; Sun, 17 Jul 2022 15:20:21 -0700 (PDT) Received: by mail-ed1-x530.google.com with SMTP id k30so13066810edk.8 for ; Sun, 17 Jul 2022 15:20:21 -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=En7+TVW64zRoyWuupOH6lOq4ewhG8jBuFQhAW9bo4EA=; b=LGJfl36f2O5Bm4X8ngpgpR0b/dXKh54Pz+lSzrGO2ewRUh7MXkdn+lHpICU07SeFPr ka8Cr/uDsKpZsxiW+vXyqCLKN0dw4PGJ3kSR0AWJEcR+zqclLPu/c/byO73dnFCtwqra BGtMAT+o7NgoWvqopCgPoarEVOPxJ/kc/g4RYa4djeNVRziKAFxBze1q512kbmOJ1AIr aNFclHjg86p+9V7XIrYfAmdtuoQcuI1KED1zngJDJqP72eG3ONd+NrYPiJ4Ct6h6ksaL etp9pgDwoGzalpuwh++xHmpB/kxCnEqjT+ydvqJo+z2MLJTJ2zijSH+ek2ZubnIOGQSU GIGw== 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=En7+TVW64zRoyWuupOH6lOq4ewhG8jBuFQhAW9bo4EA=; b=NZst6wAAktUS1tzA+WcssEMZW09bDESyej5Bl7t2dOcFsZo8ecqq4w3q4pJ4hLAh5G UYVAHXmqlh5XJ7W0Hd3h7UmX6GS23O/+q/4QI5Oq7j0zz5VW+2iFvQMHtTse7yVsRtmd kI66Oa6Ph59t0SbnIL1n2odSUGbRNOGemAA+r5EM7LBO6SuNNtp0QgqqcuFYBOfLvGvz lLGSp/2isHF5EEIfNTxyBAHZTFzo5FqJFQrENDx7l0qjw+TYTSM+gstMqk8s6fUIrUFI +jKFLQRgMXNER6zagy5rK4ZrkNr8ixvwoqYDCj4xbbP+AajlYftzwG25Ue/UB3FY/G9k l6ow== X-Gm-Message-State: AJIora9edVFN1eVr1zv9h6xtDXXOu2Ovv+B03GEkXdOgEHRjca+v8R/U BWWeGq5O+1kHduprzk9dhbs= X-Received: by 2002:a05:6402:3689:b0:43a:7c1c:8960 with SMTP id ej9-20020a056402368900b0043a7c1c8960mr32930306edb.79.1658096419075; Sun, 17 Jul 2022 15:20:19 -0700 (PDT) Received: from matrix-ESPRIMO-P710 (p54a07b82.dip0.t-ipconnect.de. [84.160.123.130]) by smtp.gmail.com with ESMTPSA id le20-20020a170906ae1400b00724261b592esm4723424ejb.186.2022.07.17.15.20.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jul 2022 15:20:18 -0700 (PDT) Date: Mon, 18 Jul 2022 00:20:16 +0200 From: Philipp Hortmann To: Forest Bond , Greg Kroah-Hartman , linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 3/7] staging: vt6655: Convert macro vt6655_mac_dma_ctl to function Message-ID: 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 Convert macro vt6655_mac_dma_ctl to function. checkpatch.pl does not accept multiline macros. Signed-off-by: Philipp Hortmann --- drivers/staging/vt6655/device_main.c | 13 +++++++++++++ drivers/staging/vt6655/mac.h | 10 ---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index 6525b7baf644..cf25644f8671 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -125,6 +125,8 @@ 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 int device_init_rd0_ring(struct vnt_private *priv); static int device_init_rd1_ring(struct vnt_private *priv); static int device_init_td0_ring(struct vnt_private *priv); @@ -205,6 +207,17 @@ 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) +{ + unsigned long reg_value; + + reg_value = ioread32(iobase + MAC_REG_RXDMACTL0); + if (reg_value & DMACTL_RUN) + iowrite32(DMACTL_WAKE, iobase + MAC_REG_RXDMACTL0); + else + iowrite32(DMACTL_RUN, iobase + MAC_REG_RXDMACTL0); +} + /* * Initialisation of MAC & BBP registers */ diff --git a/drivers/staging/vt6655/mac.h b/drivers/staging/vt6655/mac.h index 60e0f980bcc5..5747de436911 100644 --- a/drivers/staging/vt6655/mac.h +++ b/drivers/staging/vt6655/mac.h @@ -537,16 +537,6 @@ /*--------------------- Export Macros ------------------------------*/ -#define vt6655_mac_dma_ctl(iobase) \ -do { \ - unsigned long reg_value; \ - reg_value = ioread32(iobase + MAC_REG_RXDMACTL0); \ - if (reg_value & DMACTL_RUN) \ - iowrite32(DMACTL_WAKE, iobase + MAC_REG_RXDMACTL0); \ - else \ - iowrite32(DMACTL_RUN, iobase + MAC_REG_RXDMACTL0); \ -} while (0) - #define MACvReceive1(iobase) \ do { \ unsigned long reg_value; \ -- 2.37.1