diff mbox series

[net-next,8/8] net: dsa: ocelot: unexport felix_phylink_mac_ops and felix_switch_ops

Message ID 20240530163333.2458884-9-vladimir.oltean@nxp.com (mailing list archive)
State Accepted
Commit a4303941c6f399816eac0a56c627008a41c9336d
Delegated to: Netdev Maintainers
Headers show
Series Probing cleanup for the Felix DSA driver | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
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: 902 this patch: 902
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 11 of 11 maintainers
netdev/build_clang success Errors and warnings before: 906 this patch: 906
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: 906 this patch: 906
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 33 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-05-31--03-00 (tests: 1040)

Commit Message

Vladimir Oltean May 30, 2024, 4:33 p.m. UTC
Now that the common felix_register_switch() from the umbrella driver
is the only entity that accesses these data structures, we can remove
them from the list of the exported symbols.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 drivers/net/dsa/ocelot/felix.c | 6 ++----
 drivers/net/dsa/ocelot/felix.h | 3 ---
 2 files changed, 2 insertions(+), 7 deletions(-)

Comments

Sai Krishna Gajula May 30, 2024, 6:12 p.m. UTC | #1
> -----Original Message-----
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> Sent: Thursday, May 30, 2024 10:04 PM
> To: netdev@vger.kernel.org
> Cc: David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@google.com>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; Claudiu Manoil <claudiu.manoil@nxp.com>;
> Alexandre Belloni <alexandre.belloni@bootlin.com>;
> UNGLinuxDriver@microchip.com; Andrew Lunn <andrew@lunn.ch>; Florian
> Fainelli <f.fainelli@gmail.com>; Colin Foster <colin.foster@in-
> advantage.com>; Russell King <linux@armlinux.org.uk>
> Subject: [PATCH net-next 8/8] net: dsa: ocelot: unexport
> felix_phylink_mac_ops and felix_switch_ops
> 
> Now that the common felix_register_switch() from the umbrella driver is the
> only entity that accesses these data structures, we can remove them from the
> list of the exported symbols.
> 
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  drivers/net/dsa/ocelot/felix.c | 6 ++----  drivers/net/dsa/ocelot/felix.h | 3 ---
>  2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c index
> accf737f7b69..d12c4e85baa7 100644
> --- a/drivers/net/dsa/ocelot/felix.c
> +++ b/drivers/net/dsa/ocelot/felix.c
> @@ -2106,15 +2106,14 @@ static void felix_get_mm_stats(struct dsa_switch
> *ds, int port,
>  	ocelot_port_get_mm_stats(ocelot, port, stats);  }
> 
> -const struct phylink_mac_ops felix_phylink_mac_ops = {
> +static const struct phylink_mac_ops felix_phylink_mac_ops = {
>  	.mac_select_pcs		= felix_phylink_mac_select_pcs,
>  	.mac_config		= felix_phylink_mac_config,
>  	.mac_link_down		= felix_phylink_mac_link_down,
>  	.mac_link_up		= felix_phylink_mac_link_up,
>  };
> -EXPORT_SYMBOL_GPL(felix_phylink_mac_ops);
> 
> -const struct dsa_switch_ops felix_switch_ops = {
> +static const struct dsa_switch_ops felix_switch_ops = {
>  	.get_tag_protocol		= felix_get_tag_protocol,
>  	.change_tag_protocol		= felix_change_tag_protocol,
>  	.connect_tag_protocol		= felix_connect_tag_protocol,
> @@ -2193,7 +2192,6 @@ const struct dsa_switch_ops felix_switch_ops = {
>  	.port_set_host_flood		= felix_port_set_host_flood,
>  	.port_change_conduit		= felix_port_change_conduit,
>  };
> -EXPORT_SYMBOL_GPL(felix_switch_ops);
> 
>  int felix_register_switch(struct device *dev, resource_size_t switch_base,
>  			  int num_flooding_pgids, bool ptp,
> diff --git a/drivers/net/dsa/ocelot/felix.h b/drivers/net/dsa/ocelot/felix.h
> index 85b4f8616003..211991f494e3 100644
> --- a/drivers/net/dsa/ocelot/felix.h
> +++ b/drivers/net/dsa/ocelot/felix.h
> @@ -82,9 +82,6 @@ struct felix_tag_proto_ops {
>  			      struct netlink_ext_ack *extack);  };
> 
> -extern const struct phylink_mac_ops felix_phylink_mac_ops; -extern const
> struct dsa_switch_ops felix_switch_ops;
> -
>  /* DSA glue / front-end for struct ocelot */  struct felix {
>  	struct dsa_switch		*ds;
> --
> 2.34.1
> 
Reviewed-by: Sai Krishna <saikrishnag@marvell.com>
diff mbox series

Patch

diff --git a/drivers/net/dsa/ocelot/felix.c b/drivers/net/dsa/ocelot/felix.c
index accf737f7b69..d12c4e85baa7 100644
--- a/drivers/net/dsa/ocelot/felix.c
+++ b/drivers/net/dsa/ocelot/felix.c
@@ -2106,15 +2106,14 @@  static void felix_get_mm_stats(struct dsa_switch *ds, int port,
 	ocelot_port_get_mm_stats(ocelot, port, stats);
 }
 
-const struct phylink_mac_ops felix_phylink_mac_ops = {
+static const struct phylink_mac_ops felix_phylink_mac_ops = {
 	.mac_select_pcs		= felix_phylink_mac_select_pcs,
 	.mac_config		= felix_phylink_mac_config,
 	.mac_link_down		= felix_phylink_mac_link_down,
 	.mac_link_up		= felix_phylink_mac_link_up,
 };
-EXPORT_SYMBOL_GPL(felix_phylink_mac_ops);
 
-const struct dsa_switch_ops felix_switch_ops = {
+static const struct dsa_switch_ops felix_switch_ops = {
 	.get_tag_protocol		= felix_get_tag_protocol,
 	.change_tag_protocol		= felix_change_tag_protocol,
 	.connect_tag_protocol		= felix_connect_tag_protocol,
@@ -2193,7 +2192,6 @@  const struct dsa_switch_ops felix_switch_ops = {
 	.port_set_host_flood		= felix_port_set_host_flood,
 	.port_change_conduit		= felix_port_change_conduit,
 };
-EXPORT_SYMBOL_GPL(felix_switch_ops);
 
 int felix_register_switch(struct device *dev, resource_size_t switch_base,
 			  int num_flooding_pgids, bool ptp,
diff --git a/drivers/net/dsa/ocelot/felix.h b/drivers/net/dsa/ocelot/felix.h
index 85b4f8616003..211991f494e3 100644
--- a/drivers/net/dsa/ocelot/felix.h
+++ b/drivers/net/dsa/ocelot/felix.h
@@ -82,9 +82,6 @@  struct felix_tag_proto_ops {
 			      struct netlink_ext_ack *extack);
 };
 
-extern const struct phylink_mac_ops felix_phylink_mac_ops;
-extern const struct dsa_switch_ops felix_switch_ops;
-
 /* DSA glue / front-end for struct ocelot */
 struct felix {
 	struct dsa_switch		*ds;