* [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set()
@ 2024-02-06 11:25 Vladimir Oltean
2024-02-08 10:27 ` Simon Horman
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Oltean @ 2024-02-06 11:25 UTC (permalink / raw)
To: netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, Florian Fainelli, Russell King
After commit f86ad77faf24 ("net: dsa: bcm_sf2: Utilize b53_{enable,
disable}_port"), bcm_sf2.c no longer calls b53_eee_enable_set(), and all
its callers are in b53_common.c.
We also need to move it, because it is called within b53_common.c before
its definition, and we want to avoid forward declarations.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/dsa/b53/b53_common.c | 28 +++++++++++++---------------
drivers/net/dsa/b53/b53_priv.h | 1 -
2 files changed, 13 insertions(+), 16 deletions(-)
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 9e4c9bd6abcc..b2eeff04f4c8 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -559,6 +559,19 @@ static void b53_port_set_learning(struct b53_device *dev, int port,
b53_write16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, reg);
}
+static void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
+{
+ struct b53_device *dev = ds->priv;
+ u16 reg;
+
+ b53_read16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, ®);
+ if (enable)
+ reg |= BIT(port);
+ else
+ reg &= ~BIT(port);
+ b53_write16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, reg);
+}
+
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy)
{
struct b53_device *dev = ds->priv;
@@ -2193,21 +2206,6 @@ void b53_mirror_del(struct dsa_switch *ds, int port,
}
EXPORT_SYMBOL(b53_mirror_del);
-void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable)
-{
- struct b53_device *dev = ds->priv;
- u16 reg;
-
- b53_read16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, ®);
- if (enable)
- reg |= BIT(port);
- else
- reg &= ~BIT(port);
- b53_write16(dev, B53_EEE_PAGE, B53_EEE_EN_CTRL, reg);
-}
-EXPORT_SYMBOL(b53_eee_enable_set);
-
-
/* Returns 0 if EEE was not enabled, or 1 otherwise
*/
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy)
diff --git a/drivers/net/dsa/b53/b53_priv.h b/drivers/net/dsa/b53/b53_priv.h
index c26a03755e83..c13a907947f1 100644
--- a/drivers/net/dsa/b53/b53_priv.h
+++ b/drivers/net/dsa/b53/b53_priv.h
@@ -395,7 +395,6 @@ void b53_mirror_del(struct dsa_switch *ds, int port,
int b53_enable_port(struct dsa_switch *ds, int port, struct phy_device *phy);
void b53_disable_port(struct dsa_switch *ds, int port);
void b53_brcm_hdr_setup(struct dsa_switch *ds, int port);
-void b53_eee_enable_set(struct dsa_switch *ds, int port, bool enable);
int b53_eee_init(struct dsa_switch *ds, int port, struct phy_device *phy);
int b53_get_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
int b53_set_mac_eee(struct dsa_switch *ds, int port, struct ethtool_keee *e);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set()
2024-02-06 11:25 [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set() Vladimir Oltean
@ 2024-02-08 10:27 ` Simon Horman
2024-02-08 17:56 ` Florian Fainelli
2024-02-09 3:11 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-02-08 10:27 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Andrew Lunn, Florian Fainelli, Russell King
On Tue, Feb 06, 2024 at 01:25:27PM +0200, Vladimir Oltean wrote:
> After commit f86ad77faf24 ("net: dsa: bcm_sf2: Utilize b53_{enable,
> disable}_port"), bcm_sf2.c no longer calls b53_eee_enable_set(), and all
> its callers are in b53_common.c.
>
> We also need to move it, because it is called within b53_common.c before
> its definition, and we want to avoid forward declarations.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set()
2024-02-06 11:25 [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set() Vladimir Oltean
2024-02-08 10:27 ` Simon Horman
@ 2024-02-08 17:56 ` Florian Fainelli
2024-02-09 3:11 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2024-02-08 17:56 UTC (permalink / raw)
To: Vladimir Oltean, netdev
Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Andrew Lunn, Russell King
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
On 2/6/24 03:25, Vladimir Oltean wrote:
> After commit f86ad77faf24 ("net: dsa: bcm_sf2: Utilize b53_{enable,
> disable}_port"), bcm_sf2.c no longer calls b53_eee_enable_set(), and all
> its callers are in b53_common.c.
>
> We also need to move it, because it is called within b53_common.c before
> its definition, and we want to avoid forward declarations.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set()
2024-02-06 11:25 [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set() Vladimir Oltean
2024-02-08 10:27 ` Simon Horman
2024-02-08 17:56 ` Florian Fainelli
@ 2024-02-09 3:11 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-09 3:11 UTC (permalink / raw)
To: Vladimir Oltean
Cc: netdev, davem, edumazet, kuba, pabeni, andrew, florian.fainelli,
linux
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 6 Feb 2024 13:25:27 +0200 you wrote:
> After commit f86ad77faf24 ("net: dsa: bcm_sf2: Utilize b53_{enable,
> disable}_port"), bcm_sf2.c no longer calls b53_eee_enable_set(), and all
> its callers are in b53_common.c.
>
> We also need to move it, because it is called within b53_common.c before
> its definition, and we want to avoid forward declarations.
>
> [...]
Here is the summary with links:
- [net-next] net: dsa: b53: unexport and move b53_eee_enable_set()
https://git.kernel.org/netdev/net-next/c/a2e520643be1
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] 4+ messages in thread
end of thread, other threads:[~2024-02-09 3:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-06 11:25 [PATCH net-next] net: dsa: b53: unexport and move b53_eee_enable_set() Vladimir Oltean
2024-02-08 10:27 ` Simon Horman
2024-02-08 17:56 ` Florian Fainelli
2024-02-09 3:11 ` 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).