Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp24299pxu; Tue, 15 Dec 2020 13:56:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzfcLA5vLe6fewS9b75FfBj5kAP0pJywdprWMkzZjWSSa1syUfFfolDgcFjOhPea/jso9hm X-Received: by 2002:a17:906:1498:: with SMTP id x24mr27766686ejc.170.1608069378403; Tue, 15 Dec 2020 13:56:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608069378; cv=none; d=google.com; s=arc-20160816; b=WtCcg/JYlCGy3sqgyePPpCNGc73yfc/9F1Ju0bBT/NF33Sk7uQgZfpffSf3NsZqTN7 4hR5ghHiHDZHMVb0xP3DZ4XKqGAcPsPl6H18TLcty24kTGaYe2haQdqTA+n2HvADcRD9 IemvTWyOpqlVrGBGKeG17ybj4J3xWmyPX8uZi5zqUbwiL9TAw7YW7zzhXctMLOkUhQzS hYHfvPQ79oksVGZQz5QPW/CmYBhNhcCTPek1+hLSmmffGOEC28YMVRmejLvOs3tk65PQ FBlHdmut7JdF8kjTe1gn0WN9G80fzggcdTdu3UH/psPIEMxizs+cx7cSXGd3uynACNvr ncPQ== 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 :dkim-signature; bh=2JfAB8EQ1g1aNPQ1eBwzH0B4RvS7BXItaVKMVRyVjSQ=; b=D4ZTgrdKShWQKyiGz5ZcYACD52B5TNCeiHKEN8ySVZkHkwpvk3IpHaD4l2rBWdRvon B+uRwFrrrQ6ZaYkgYrzT0tUwFzItw10hIz/HLF0QvOP/eru47cT1hN49sxsKWlp30xIJ MwB8qo2eouPouTj8FryLxItQMeQB7bwdgCwbwDvNWG3s3QBHG4QizBqlkA4WWoD8ZDo2 LQgOu6vZ0P1d/Q8N6mphydZYPge0nQdCerZlofQEz1N1x0J9pGy8CbmX/edpIl9UILGq P2fUknJOMzDY+F/1953EWAjjp91xjTDqaOhgQ8EEZ84fOJVSUUl0Aq/TsjzNF2dO1gLn qfhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=psNPUrrH; 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 d20si1403957eds.14.2020.12.15.13.55.54; Tue, 15 Dec 2020 13:56:18 -0800 (PST) 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; dkim=pass header.i=@walle.cc header.s=mail2016061301 header.b=psNPUrrH; 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 S1729493AbgLOVXE (ORCPT + 99 others); Tue, 15 Dec 2020 16:23:04 -0500 Received: from ssl.serverraum.org ([176.9.125.105]:56129 "EHLO ssl.serverraum.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729472AbgLOVW5 (ORCPT ); Tue, 15 Dec 2020 16:22:57 -0500 Received: from mwalle01.fritz.box (unknown [IPv6:2a02:810c:c200:2e91:fa59:71ff:fe9b:b851]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ssl.serverraum.org (Postfix) with ESMTPSA id 955FE23E6D; Tue, 15 Dec 2020 22:22:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2016061301; t=1608067331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2JfAB8EQ1g1aNPQ1eBwzH0B4RvS7BXItaVKMVRyVjSQ=; b=psNPUrrH/IuT8XBR7iygwo9oJp8/hF6/o1mubwcovcSEcu24bLwM0vlOisNGT/aRxkBDsv AkJdq0TAEVwnuJ1WlqZNPAW+Uneja6wgRs5h4CsKRftAAJK4gtmYjlY4lczBicuXSnlvg9 mdlI9rQSvZbEj/fZx8WWfBDB78DVXSY= From: Michael Walle To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Claudiu Manoil , "David S . Miller" , Jakub Kicinski , Alex Marginean , Vladimir Oltean , Michael Walle Subject: [PATCH net-next 4/4] enetc: reorder macros and functions Date: Tue, 15 Dec 2020 22:22:00 +0100 Message-Id: <20201215212200.30915-5-michael@walle.cc> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201215212200.30915-1-michael@walle.cc> References: <20201215212200.30915-1-michael@walle.cc> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that there aren't any more macros with parameters, move the macros above any functions. Signed-off-by: Michael Walle --- .../net/ethernet/freescale/enetc/enetc_mdio.c | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/freescale/enetc/enetc_mdio.c b/drivers/net/ethernet/freescale/enetc/enetc_mdio.c index 591b16f01507..70e6d97b380f 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc_mdio.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_mdio.c @@ -14,17 +14,6 @@ #define ENETC_MDIO_DATA 0x8 /* MDIO data */ #define ENETC_MDIO_ADDR 0xc /* MDIO address */ -static inline u32 enetc_mdio_rd(struct enetc_mdio_priv *mdio_priv, int off) -{ - return enetc_port_rd_mdio(mdio_priv->hw, mdio_priv->mdio_base + off); -} - -static inline void enetc_mdio_wr(struct enetc_mdio_priv *mdio_priv, int off, - u32 val) -{ - enetc_port_wr_mdio(mdio_priv->hw, mdio_priv->mdio_base + off, val); -} - #define MDIO_CFG_CLKDIV(x) ((((x) >> 1) & 0xff) << 8) #define MDIO_CFG_BSY BIT(0) #define MDIO_CFG_RD_ER BIT(1) @@ -42,6 +31,17 @@ static inline void enetc_mdio_wr(struct enetc_mdio_priv *mdio_priv, int off, #define MDIO_CTL_PORT_ADDR(x) (((x) & 0x1f) << 5) #define MDIO_CTL_READ BIT(15) +static inline u32 enetc_mdio_rd(struct enetc_mdio_priv *mdio_priv, int off) +{ + return enetc_port_rd_mdio(mdio_priv->hw, mdio_priv->mdio_base + off); +} + +static inline void enetc_mdio_wr(struct enetc_mdio_priv *mdio_priv, int off, + u32 val) +{ + enetc_port_wr_mdio(mdio_priv->hw, mdio_priv->mdio_base + off, val); +} + static bool enetc_mdio_is_busy(struct enetc_mdio_priv *mdio_priv) { return enetc_mdio_rd(mdio_priv, ENETC_MDIO_CFG) & MDIO_CFG_BSY; -- 2.20.1