* [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue
2025-06-16 10:16 [PATCH net-next 0/3] net: stmmac: rk: more cleanups Russell King (Oracle)
@ 2025-06-16 10:15 ` Russell King (Oracle)
2025-06-16 13:56 ` Andrew Lunn
2025-06-16 10:15 ` [PATCH net-next 2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data Russell King (Oracle)
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Russell King (Oracle) @ 2025-06-16 10:15 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
netdev, Paolo Abeni
Fix a code formatting issue introduced in the previous series, no
space after , before "int".
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 18ae12df4a85..5865a17d5fe8 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -904,7 +904,7 @@ static const struct rk_reg_speed_data rk3528_gmac1_reg_speed_data = {
};
static int rk3528_set_speed(struct rk_priv_data *bsp_priv,
- phy_interface_t interface,int speed)
+ phy_interface_t interface, int speed)
{
const struct rk_reg_speed_data *rsd;
unsigned int reg;
--
2.30.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data
2025-06-16 10:16 [PATCH net-next 0/3] net: stmmac: rk: more cleanups Russell King (Oracle)
2025-06-16 10:15 ` [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue Russell King (Oracle)
@ 2025-06-16 10:15 ` Russell King (Oracle)
2025-06-16 13:57 ` Andrew Lunn
2025-06-16 10:16 ` [PATCH net-next 3/3] net: stmmac: rk: remove unnecessary clk_mac Russell King (Oracle)
2025-06-17 23:10 ` [PATCH net-next 0/3] net: stmmac: rk: more cleanups patchwork-bot+netdevbpf
3 siblings, 1 reply; 8+ messages in thread
From: Russell King (Oracle) @ 2025-06-16 10:15 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
netdev, Paolo Abeni
All the code in dwmac-rk uses &bsp_priv->pdev->dev, nothing uses
bsp_priv->pdev directly. Store the struct device rather than the
struct platform_device in struct rk_priv_data, and simplifying the
code.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 5865a17d5fe8..7ee101a6cfcf 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -67,7 +67,7 @@ enum rk_clocks_index {
};
struct rk_priv_data {
- struct platform_device *pdev;
+ struct device *dev;
phy_interface_t phy_iface;
int id;
struct regulator *regulator;
@@ -248,7 +248,7 @@ static int px30_set_speed(struct rk_priv_data *bsp_priv,
phy_interface_t interface, int speed)
{
struct clk *clk_mac_speed = bsp_priv->clks[RK_CLK_MAC_SPEED].clk;
- struct device *dev = &bsp_priv->pdev->dev;
+ struct device *dev = bsp_priv->dev;
unsigned int con1;
long rate;
@@ -1380,8 +1380,8 @@ static const struct rk_gmac_ops rv1126_ops = {
static int rk_gmac_clk_init(struct plat_stmmacenet_data *plat)
{
struct rk_priv_data *bsp_priv = plat->bsp_priv;
- struct device *dev = &bsp_priv->pdev->dev;
int phy_iface = bsp_priv->phy_iface;
+ struct device *dev = bsp_priv->dev;
int i, j, ret;
bsp_priv->clk_enabled = false;
@@ -1473,8 +1473,8 @@ static int gmac_clk_enable(struct rk_priv_data *bsp_priv, bool enable)
static int phy_power_on(struct rk_priv_data *bsp_priv, bool enable)
{
struct regulator *ldo = bsp_priv->regulator;
+ struct device *dev = bsp_priv->dev;
int ret;
- struct device *dev = &bsp_priv->pdev->dev;
if (enable) {
ret = regulator_enable(ldo);
@@ -1598,7 +1598,7 @@ static struct rk_priv_data *rk_gmac_setup(struct platform_device *pdev,
dev_info(dev, "integrated PHY? (%s).\n",
bsp_priv->integrated_phy ? "yes" : "no");
- bsp_priv->pdev = pdev;
+ bsp_priv->dev = dev;
return bsp_priv;
}
@@ -1618,7 +1618,7 @@ static int rk_gmac_check_ops(struct rk_priv_data *bsp_priv)
return -EINVAL;
break;
default:
- dev_err(&bsp_priv->pdev->dev,
+ dev_err(bsp_priv->dev,
"unsupported interface %d", bsp_priv->phy_iface);
}
return 0;
@@ -1626,8 +1626,8 @@ static int rk_gmac_check_ops(struct rk_priv_data *bsp_priv)
static int rk_gmac_powerup(struct rk_priv_data *bsp_priv)
{
+ struct device *dev = bsp_priv->dev;
int ret;
- struct device *dev = &bsp_priv->pdev->dev;
ret = rk_gmac_check_ops(bsp_priv);
if (ret)
@@ -1683,7 +1683,7 @@ static void rk_gmac_powerdown(struct rk_priv_data *gmac)
if (gmac->integrated_phy && gmac->ops->integrated_phy_powerdown)
gmac->ops->integrated_phy_powerdown(gmac);
- pm_runtime_put_sync(&gmac->pdev->dev);
+ pm_runtime_put_sync(gmac->dev);
phy_power_on(gmac, false);
gmac_clk_enable(gmac, false);
--
2.30.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 3/3] net: stmmac: rk: remove unnecessary clk_mac
2025-06-16 10:16 [PATCH net-next 0/3] net: stmmac: rk: more cleanups Russell King (Oracle)
2025-06-16 10:15 ` [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue Russell King (Oracle)
2025-06-16 10:15 ` [PATCH net-next 2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data Russell King (Oracle)
@ 2025-06-16 10:16 ` Russell King (Oracle)
2025-06-16 13:58 ` Andrew Lunn
2025-06-17 23:10 ` [PATCH net-next 0/3] net: stmmac: rk: more cleanups patchwork-bot+netdevbpf
3 siblings, 1 reply; 8+ messages in thread
From: Russell King (Oracle) @ 2025-06-16 10:16 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
netdev, Paolo Abeni
The stmmac platform code already gets the "stmmaceth" clock, so there
is no need for drivers to get it. Use the stored pointer in struct
plat_stmmacenet_data instead of getting and storing our own pointer.
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
index 7ee101a6cfcf..79b92130a03f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c
@@ -80,7 +80,6 @@ struct rk_priv_data {
struct clk_bulk_data *clks;
int num_clks;
- struct clk *clk_mac;
struct clk *clk_phy;
struct reset_control *phy_reset;
@@ -1408,16 +1407,10 @@ static int rk_gmac_clk_init(struct plat_stmmacenet_data *plat)
if (ret)
return dev_err_probe(dev, ret, "Failed to get clocks\n");
- /* "stmmaceth" will be enabled by the core */
- bsp_priv->clk_mac = devm_clk_get(dev, "stmmaceth");
- ret = PTR_ERR_OR_ZERO(bsp_priv->clk_mac);
- if (ret)
- return dev_err_probe(dev, ret, "Cannot get stmmaceth clock\n");
-
if (bsp_priv->clock_input) {
dev_info(dev, "clock input from PHY\n");
} else if (phy_iface == PHY_INTERFACE_MODE_RMII) {
- clk_set_rate(bsp_priv->clk_mac, 50000000);
+ clk_set_rate(plat->stmmac_clk, 50000000);
}
if (plat->phy_node && bsp_priv->integrated_phy) {
--
2.30.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next 0/3] net: stmmac: rk: more cleanups
@ 2025-06-16 10:16 Russell King (Oracle)
2025-06-16 10:15 ` [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue Russell King (Oracle)
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Russell King (Oracle) @ 2025-06-16 10:16 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Alexandre Torgue, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, linux-arm-kernel, linux-stm32, Maxime Coquelin,
netdev, Paolo Abeni
Hi,
Another couple of cleanups removing pointless code.
drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue
2025-06-16 10:15 ` [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue Russell King (Oracle)
@ 2025-06-16 13:56 ` Andrew Lunn
0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-06-16 13:56 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Heiner Kallweit, Alexandre Torgue, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, linux-arm-kernel, linux-stm32,
Maxime Coquelin, netdev, Paolo Abeni
On Mon, Jun 16, 2025 at 11:15:51AM +0100, Russell King (Oracle) wrote:
> Fix a code formatting issue introduced in the previous series, no
> space after , before "int".
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data
2025-06-16 10:15 ` [PATCH net-next 2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data Russell King (Oracle)
@ 2025-06-16 13:57 ` Andrew Lunn
0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-06-16 13:57 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Heiner Kallweit, Alexandre Torgue, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, linux-arm-kernel, linux-stm32,
Maxime Coquelin, netdev, Paolo Abeni
On Mon, Jun 16, 2025 at 11:15:56AM +0100, Russell King (Oracle) wrote:
> All the code in dwmac-rk uses &bsp_priv->pdev->dev, nothing uses
> bsp_priv->pdev directly. Store the struct device rather than the
> struct platform_device in struct rk_priv_data, and simplifying the
> code.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 3/3] net: stmmac: rk: remove unnecessary clk_mac
2025-06-16 10:16 ` [PATCH net-next 3/3] net: stmmac: rk: remove unnecessary clk_mac Russell King (Oracle)
@ 2025-06-16 13:58 ` Andrew Lunn
0 siblings, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2025-06-16 13:58 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Heiner Kallweit, Alexandre Torgue, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, linux-arm-kernel, linux-stm32,
Maxime Coquelin, netdev, Paolo Abeni
On Mon, Jun 16, 2025 at 11:16:01AM +0100, Russell King (Oracle) wrote:
> The stmmac platform code already gets the "stmmaceth" clock, so there
> is no need for drivers to get it. Use the stored pointer in struct
> plat_stmmacenet_data instead of getting and storing our own pointer.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next 0/3] net: stmmac: rk: more cleanups
2025-06-16 10:16 [PATCH net-next 0/3] net: stmmac: rk: more cleanups Russell King (Oracle)
` (2 preceding siblings ...)
2025-06-16 10:16 ` [PATCH net-next 3/3] net: stmmac: rk: remove unnecessary clk_mac Russell King (Oracle)
@ 2025-06-17 23:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-17 23:10 UTC (permalink / raw)
To: Russell King
Cc: andrew, hkallweit1, alexandre.torgue, andrew+netdev, davem,
edumazet, kuba, linux-arm-kernel, linux-stm32, mcoquelin.stm32,
netdev, pabeni
Hello:
This series was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 16 Jun 2025 11:16:18 +0100 you wrote:
> Hi,
>
> Another couple of cleanups removing pointless code.
>
> drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
Here is the summary with links:
- [net-next,1/3] net: stmmac: rk: fix code formmating issue
https://git.kernel.org/netdev/net-next/c/a44769c97e9a
- [net-next,2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data
https://git.kernel.org/netdev/net-next/c/8f6503993911
- [net-next,3/3] net: stmmac: rk: remove unnecessary clk_mac
https://git.kernel.org/netdev/net-next/c/cf283fd6b8be
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-06-17 23:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 10:16 [PATCH net-next 0/3] net: stmmac: rk: more cleanups Russell King (Oracle)
2025-06-16 10:15 ` [PATCH net-next 1/3] net: stmmac: rk: fix code formmating issue Russell King (Oracle)
2025-06-16 13:56 ` Andrew Lunn
2025-06-16 10:15 ` [PATCH net-next 2/3] net: stmmac: rk: use device rather than platform device in rk_priv_data Russell King (Oracle)
2025-06-16 13:57 ` Andrew Lunn
2025-06-16 10:16 ` [PATCH net-next 3/3] net: stmmac: rk: remove unnecessary clk_mac Russell King (Oracle)
2025-06-16 13:58 ` Andrew Lunn
2025-06-17 23:10 ` [PATCH net-next 0/3] net: stmmac: rk: more cleanups patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).