diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-11-21 15:55:48 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-22 20:41:51 -0800 |
commit | 0c603136e1e0868fb5325c3b2addc669a10ed384 (patch) | |
tree | d26685177c3d4cd44b2286f4004a71d4c3dedd5b /net/dsa | |
parent | bd954b826032e7bd6be8a53e30eb81c1b348aef6 (diff) | |
download | linux-stable-0c603136e1e0868fb5325c3b2addc669a10ed384.tar.gz linux-stable-0c603136e1e0868fb5325c3b2addc669a10ed384.tar.bz2 linux-stable-0c603136e1e0868fb5325c3b2addc669a10ed384.zip |
net: dsa: move headers exported by switch.c to switch.h
Reduce code bloat in dsa_priv.h by moving the prototypes exported by
switch.h into their own header file.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/dsa2.c | 1 | ||||
-rw-r--r-- | net/dsa/dsa_priv.h | 4 | ||||
-rw-r--r-- | net/dsa/port.c | 1 | ||||
-rw-r--r-- | net/dsa/switch.c | 1 | ||||
-rw-r--r-- | net/dsa/switch.h | 11 | ||||
-rw-r--r-- | net/dsa/tag_8021q.c | 1 |
6 files changed, 15 insertions, 4 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index 5373edf45a62..7c6b689267d0 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -22,6 +22,7 @@ #include "master.h" #include "port.h" #include "slave.h" +#include "switch.h" #include "tag.h" static DEFINE_MUTEX(dsa2_mutex); diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index eee2c9729e32..4f21228c6f52 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h @@ -155,10 +155,6 @@ bool dsa_schedule_work(struct work_struct *work); /* netlink.c */ extern struct rtnl_link_ops dsa_link_ops __read_mostly; -/* switch.c */ -int dsa_switch_register_notifier(struct dsa_switch *ds); -void dsa_switch_unregister_notifier(struct dsa_switch *ds); - static inline bool dsa_switch_supports_uc_filtering(struct dsa_switch *ds) { return ds->ops->port_fdb_add && ds->ops->port_fdb_del && diff --git a/net/dsa/port.c b/net/dsa/port.c index 56728242f079..bf2c98215021 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -15,6 +15,7 @@ #include "dsa_priv.h" #include "port.h" #include "slave.h" +#include "switch.h" /** * dsa_port_notify - Notify the switching fabric of changes to a port diff --git a/net/dsa/switch.c b/net/dsa/switch.c index d0d5a1c7e6f6..6a1c84c5ec8b 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -15,6 +15,7 @@ #include "dsa_priv.h" #include "port.h" #include "slave.h" +#include "switch.h" static unsigned int dsa_switch_fastest_ageing_time(struct dsa_switch *ds, unsigned int ageing_time) diff --git a/net/dsa/switch.h b/net/dsa/switch.h new file mode 100644 index 000000000000..b831b6fb45e9 --- /dev/null +++ b/net/dsa/switch.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef __DSA_SWITCH_H +#define __DSA_SWITCH_H + +struct dsa_switch; + +int dsa_switch_register_notifier(struct dsa_switch *ds); +void dsa_switch_unregister_notifier(struct dsa_switch *ds); + +#endif diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index ee5dd1a54b51..abd994dc76d5 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -9,6 +9,7 @@ #include "dsa_priv.h" #include "port.h" +#include "switch.h" #include "tag.h" /* Binary structure of the fake 12-bit VID field (when the TPID is |