[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221121135555.1227271-18-vladimir.oltean@nxp.com>
Date: Mon, 21 Nov 2022 15:55:55 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: netdev@...r.kernel.org
Cc: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH net-next 17/17] 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@....com>
---
net/dsa/dsa.c | 4 +++-
net/dsa/dsa_priv.h | 19 -------------------
net/dsa/netlink.c | 2 +-
net/dsa/netlink.h | 8 ++++++++
net/dsa/slave.c | 2 +-
net/dsa/switch.c | 2 +-
net/dsa/tag_8021q.c | 1 -
net/dsa/tag_hellcreek.c | 1 -
8 files changed, 14 insertions(+), 25 deletions(-)
delete mode 100644 net/dsa/dsa_priv.h
create mode 100644 net/dsa/netlink.h
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"
--
2.34.1
Powered by blists - more mailing lists