From nobody Wed Nov 27 07:54:10 2024 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20C5814F9E2; Sun, 13 Oct 2024 21:27:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728854878; cv=none; b=DGfNGjJXmtt6+RlQRe/8ctffs71NUJ3aGLW5oe0j1jwyC5IHEXUfCUVFHhNTiJIYq04Tds56GiPmXidlV/ua2f2Ajg73wYLn4UpfQDUUlEl9sw7xga1d7tT0hTOARZLFXo5082ReNvdBfK6PW0q8WGhyVsuwOdeqxHGD8aJNM2A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728854878; c=relaxed/simple; bh=OjTehc/SjYSJ6s+SGBVf5yG2y+QV0nJLwhhFg/WQymk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MWb6SKtSO4Iy/K1zlldIvqgTHMKoiQKrAPmXROuMPbVBznJkBIumKcKD0NvnGNtx0QcN3I7TJaWvAniw53XR2bpZRDz2vLw2UFU2UG7eJ2P7eDsvp+rkrVyMWPr0ZP56Ud7aIQQpHRIsYYo1k2Qd7MxYn5ff2L+CIkJqONTQCh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=p5bQZuSb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p5bQZuSb" Received: by smtp.kernel.org (Postfix) with ESMTPS id B5F45C4CED4; Sun, 13 Oct 2024 21:27:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728854877; bh=OjTehc/SjYSJ6s+SGBVf5yG2y+QV0nJLwhhFg/WQymk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=p5bQZuSbrNAQsbQCXgFONqwC3pWiUInNOc6I0BK394gB7gxUErhieX7Nmu2+euNVm EQeZdT8p90oLeX+0vB4FjBBjw0edo1ms6ZMFkfsJeKj2gaX3fCWZk4bid15eS/VsIW 8bhMCJQRLWRe0/mO413UGnjqj3o+r/TgcNK4SkUH1vJyQnZuiPX2HIgwDbDvnstrxz eGqCY7REuwTlThpTNNe+McIPn9FFv/2X88imQ9TkRriw6736ETLGriJs97M8/JLMZ5 hb+fhT2RknYV1exlDGco3ktCV8SGBDp9+XYKI1ltO2lMqsKV3H4FIkV9jN62jxqfLb fbc/GUitjtnow== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC31ACF2591; Sun, 13 Oct 2024 21:27:57 +0000 (UTC) From: Jan Petrous via B4 Relay Date: Sun, 13 Oct 2024 23:27:38 +0200 Subject: [PATCH v3 03/16] net: stmmac: Fix clock rate variables size Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20241013-upstream_s32cc_gmac-v3-3-d84b5a67b930@oss.nxp.com> References: <20241013-upstream_s32cc_gmac-v3-0-d84b5a67b930@oss.nxp.com> In-Reply-To: <20241013-upstream_s32cc_gmac-v3-0-d84b5a67b930@oss.nxp.com> To: Maxime Coquelin , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Richard Cochran , Andrew Lunn , Heiner Kallweit , Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Emil Renner Berthing , Minda Chen , Nicolas Ferre , Claudiu Beznea , Iyappan Subramanian , Keyur Chudgar , Quan Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro Cc: linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, imx@lists.linux.dev, devicetree@vger.kernel.org, NXP S32 Linux Team , "Jan Petrous (OSS)" , Serge Semin X-Mailer: b4 0.14.1 X-Developer-Signature: v=1; a=ed25519-sha256; t=1728854875; l=4015; i=jan.petrous@oss.nxp.com; s=20240922; h=from:subject:message-id; bh=rZtvgxdJs+uvFCspKOdVSbISr0XerCY0VS1ForZPWcc=; b=qGAdtifhY+adK80vHwqsEVOx202MRrqBh5WpmcYV0IkVWKznOLsSbId2cJxV1jKHUTTa4tLZj Y0KinVpiB/cAg9R4msHIXGf55De/5B5x9wzFZKCe9y7Bvxw/2wh2vmZ X-Developer-Key: i=jan.petrous@oss.nxp.com; a=ed25519; pk=Ke3wwK7rb2Me9UQRf6vR8AsfJZfhTyoDaxkUCqmSWYY= X-Endpoint-Received: by B4 Relay for jan.petrous@oss.nxp.com/20240922 with auth_id=217 X-Original-From: "Jan Petrous (OSS)" Reply-To: jan.petrous@oss.nxp.com From: "Jan Petrous (OSS)" The clock API clk_get_rate() returns unsigned long value. Expand affected members of stmmac platform data and convert the stmmac_clk_csr_set() and dwmac4_core_init() methods to defining the unsigned long clk_rate local variables. Signed-off-by: Jan Petrous (OSS) Reviewed-by: Andrew Lunn Reviewed-by: Serge Semin --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- include/linux/stmmac.h | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/driv= ers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 901a3c1959fa..2a5b38723635 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -777,7 +777,7 @@ static void ethqos_ptp_clk_freq_config(struct stmmac_pr= iv *priv) netdev_err(priv->dev, "Failed to max out clk_ptp_ref: %d\n", err); plat_dat->clk_ptp_rate =3D clk_get_rate(plat_dat->clk_ptp_ref); =20 - netdev_dbg(priv->dev, "PTP rate %d\n", plat_dat->clk_ptp_rate); + netdev_dbg(priv->dev, "PTP rate %lu\n", plat_dat->clk_ptp_rate); } =20 static int qcom_ethqos_probe(struct platform_device *pdev) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/ne= t/ethernet/stmicro/stmmac/dwmac4_core.c index a1858f083eef..a70bcd72f5ad 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c @@ -25,7 +25,7 @@ static void dwmac4_core_init(struct mac_device_info *hw, struct stmmac_priv *priv =3D netdev_priv(dev); void __iomem *ioaddr =3D hw->pcsr; u32 value =3D readl(ioaddr + GMAC_CONFIG); - u32 clk_rate; + unsigned long clk_rate; =20 value |=3D GMAC_CORE_INIT; =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/ne= t/ethernet/stmicro/stmmac/stmmac_main.c index f9cab62cfde9..dd155dd4903b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -300,7 +300,7 @@ static void stmmac_global_err(struct stmmac_priv *priv) */ static void stmmac_clk_csr_set(struct stmmac_priv *priv) { - u32 clk_rate; + unsigned long clk_rate; =20 clk_rate =3D clk_get_rate(priv->plat->stmmac_clk); =20 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.c index ad868e8d195d..b1e4df1a86a0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -639,7 +639,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8= *mac) dev_info(&pdev->dev, "PTP uses main clock\n"); } else { plat->clk_ptp_rate =3D clk_get_rate(plat->clk_ptp_ref); - dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate); + dev_dbg(&pdev->dev, "PTP rate %lu\n", plat->clk_ptp_rate); } =20 plat->stmmac_rst =3D devm_reset_control_get_optional(&pdev->dev, diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 865d0fe26f98..c9878a612e53 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -252,8 +252,8 @@ struct plat_stmmacenet_data { struct clk *stmmac_clk; struct clk *pclk; struct clk *clk_ptp_ref; - unsigned int clk_ptp_rate; - unsigned int clk_ref_rate; + unsigned long clk_ptp_rate; + unsigned long clk_ref_rate; unsigned int mult_fact_100ns; s32 ptp_max_adj; u32 cdc_error_adj; @@ -265,7 +265,7 @@ struct plat_stmmacenet_data { int mac_port_sel_speed; int has_xgmac; u8 vlan_fail_q; - unsigned int eee_usecs_rate; + unsigned long eee_usecs_rate; struct pci_dev *pdev; int int_snapshot_num; int msi_mac_vec; --=20 2.46.0