diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-11-21 14:55:55 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-11-23 05:41:54 +0100 |
commit | 5917bfe688672a6afc816ad472a274eb16c9bb7a (patch) | |
tree | d86eeff9ffd9ca54719cb6d983db3270265f0004 /net/dsa | |
parent | net: dsa: move tag_8021q headers to their proper place (diff) | |
download | linux-5917bfe688672a6afc816ad472a274eb16c9bb7a.tar.xz linux-5917bfe688672a6afc816ad472a274eb16c9bb7a.zip |
net: dsa: kill off dsa_priv.h
The last remnants in dsa_priv.h are a netlink-related definition for
which we create a new header, and DSA_MAX_NUM_OFFLOADING_BRIDGES which
is only used from dsa.c, so move it there.
Some inclusions need to be adjusted now that we no longer have headers
included transitively from dsa_priv.h.
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/dsa.c | 4 | ||||
-rw-r--r-- | net/dsa/dsa_priv.h | 19 | ||||
-rw-r--r-- | net/dsa/netlink.c | 2 | ||||
-rw-r--r-- | net/dsa/netlink.h | 8 | ||||
-rw-r--r-- | net/dsa/slave.c | 2 | ||||
-rw-r--r-- | net/dsa/switch.c | 2 | ||||
-rw-r--r-- | net/dsa/tag_8021q.c | 1 | ||||
-rw-r--r-- | net/dsa/tag_hellcreek.c | 1 |
8 files changed, 14 insertions, 25 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index fee4d28b7304..e5f156940c67 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c @@ -21,13 +21,15 @@ #include "devlink.h" #include "dsa.h" -#include "dsa_priv.h" #include "master.h" +#include "netlink.h" #include "port.h" #include "slave.h" #include "switch.h" #include "tag.h" +#define DSA_MAX_NUM_OFFLOADING_BRIDGES BITS_PER_LONG + static DEFINE_MUTEX(dsa2_mutex); LIST_HEAD(dsa_tree_list); diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h deleted file mode 100644 index 265659954ffd..000000000000 --- a/net/dsa/dsa_priv.h +++ /dev/null @@ -1,19 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ -/* - * net/dsa/dsa_priv.h - Hardware switch handling - * Copyright (c) 2008-2009 Marvell Semiconductor - */ - -#ifndef __DSA_PRIV_H -#define __DSA_PRIV_H - -#include <linux/phy.h> -#include <linux/netdevice.h> -#include <net/dsa.h> - -#define DSA_MAX_NUM_OFFLOADING_BRIDGES BITS_PER_LONG - -/* netlink.c */ -extern struct rtnl_link_ops dsa_link_ops __read_mostly; - -#endif diff --git a/net/dsa/netlink.c b/net/dsa/netlink.c index 824b09d904cc..bd4bbaf851de 100644 --- a/net/dsa/netlink.c +++ b/net/dsa/netlink.c @@ -4,7 +4,7 @@ #include <linux/netdevice.h> #include <net/rtnetlink.h> -#include "dsa_priv.h" +#include "netlink.h" #include "slave.h" static const struct nla_policy dsa_policy[IFLA_DSA_MAX + 1] = { diff --git a/net/dsa/netlink.h b/net/dsa/netlink.h new file mode 100644 index 000000000000..7eda2fa15722 --- /dev/null +++ b/net/dsa/netlink.h @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef __DSA_NETLINK_H +#define __DSA_NETLINK_H + +extern struct rtnl_link_ops dsa_link_ops __read_mostly; + +#endif diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 337cbd80633a..aab79c355224 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -23,9 +23,9 @@ #include <linux/netpoll.h> #include "dsa.h" -#include "dsa_priv.h" #include "port.h" #include "master.h" +#include "netlink.h" #include "slave.h" #include "tag.h" diff --git a/net/dsa/switch.c b/net/dsa/switch.c index e53cc0c3c933..d5bc4bb7310d 100644 --- a/net/dsa/switch.c +++ b/net/dsa/switch.c @@ -13,7 +13,7 @@ #include <net/switchdev.h> #include "dsa.h" -#include "dsa_priv.h" +#include "netlink.h" #include "port.h" #include "slave.h" #include "switch.h" diff --git a/net/dsa/tag_8021q.c b/net/dsa/tag_8021q.c index ac2eb933106e..b1263917fcb2 100644 --- a/net/dsa/tag_8021q.c +++ b/net/dsa/tag_8021q.c @@ -7,7 +7,6 @@ #include <linux/if_vlan.h> #include <linux/dsa/8021q.h> -#include "dsa_priv.h" #include "port.h" #include "switch.h" #include "tag.h" diff --git a/net/dsa/tag_hellcreek.c b/net/dsa/tag_hellcreek.c index a047041e7686..71884296fc70 100644 --- a/net/dsa/tag_hellcreek.c +++ b/net/dsa/tag_hellcreek.c @@ -11,7 +11,6 @@ #include <linux/skbuff.h> #include <net/dsa.h> -#include "dsa_priv.h" #include "tag.h" #define HELLCREEK_NAME "hellcreek" |