diff mbox series

[net-next] net: dsa: b53: unexport and move b53_eee_enable_set()

Message ID 20240206112527.4132299-1-vladimir.oltean@nxp.com (mailing list archive)
State Accepted
Commit a2e520643be18cf69ec06558f3409f6c6559dce1
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: dsa: b53: unexport and move b53_eee_enable_set() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1048 this patch: 1048
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 1065 this patch: 1065
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1065 this patch: 1065
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 47 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-02-09--00-00 (tests: 687)

Commit Message

Vladimir Oltean Feb. 6, 2024, 11:25 a.m. UTC
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(-)

Comments

Simon Horman Feb. 8, 2024, 10:27 a.m. UTC | #1
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>
Florian Fainelli Feb. 8, 2024, 5:56 p.m. UTC | #2
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>
patchwork-bot+netdevbpf@kernel.org Feb. 9, 2024, 3:11 a.m. UTC | #3
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!
diff mbox series

Patch

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, &reg);
+	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, &reg);
-	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);