net: dsa: kill off dsa_priv.h
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 21 Nov 2022 13:55:55 +0000 (15:55 +0200)
committerJakub Kicinski <kuba@kernel.org>
Wed, 23 Nov 2022 04:41:54 +0000 (20:41 -0800)
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>
net/dsa/dsa.c
net/dsa/dsa_priv.h [deleted file]
net/dsa/netlink.c
net/dsa/netlink.h [new file with mode: 0644]
net/dsa/slave.c
net/dsa/switch.c
net/dsa/tag_8021q.c
net/dsa/tag_hellcreek.c

index fee4d28b730441a4ce4d08e104d11c2f8f9bd106..e5f156940c6711a111964dd7ba2052579db5fbac 100644 (file)
 
 #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 (file)
index 2656599..0000000
+++ /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
index 824b09d904cc298ef792204f346299c6fb58d572..bd4bbaf851dea05d5c57b85fd0e8070c1406db39 100644 (file)
@@ -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 (file)
index 0000000..7eda2fa
--- /dev/null
@@ -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
index 337cbd80633a01bce0efa136414f8761fb7917e9..aab79c3552249c744bfb5d24d83cd05399ba6954 100644 (file)
@@ -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"
 
index e53cc0c3c933526d6ab5d616bb3c7f677df5f22f..d5bc4bb7310dc0232e3d9e8d766f27df4cfe5259 100644 (file)
@@ -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"
index ac2eb933106e903fc59b1e77285b81c3f7d9da12..b1263917fcb2061a28dba39e83d9f915e8f03d81 100644 (file)
@@ -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"
index a047041e7686f43cb5682da7e793c247d1fa20ea..71884296fc70deff39df0e46731212376fd809a5 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/skbuff.h>
 #include <net/dsa.h>
 
-#include "dsa_priv.h"
 #include "tag.h"
 
 #define HELLCREEK_NAME         "hellcreek"