* [PATCH net-next 0/3] net: dsa: Split platform data to header file
@ 2019-01-15 23:06 Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 1/3] " Florian Fainelli
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Florian Fainelli @ 2019-01-15 23:06 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement, Russell King,
Vivien Didelot, David S. Miller, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Andrew Morton, Nicolas Ferre, Arnd Bergmann,
open list,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support
Hi all,
This patch series decouples the DSA platform data structures from
net/dsa.h which was getting used for all sorts of DSA related
structures.
It would probably make sense for this series to go via David's net-next
tree to avoid conflicts on the ARM part, since we cannot obviously
include a header that does not yet exist.
No functional changes intended.
Florian Fainelli (3):
net: dsa: Split platform data to header file
ARM: orion5x: Include platform_data/dsa.h
net: dsa: Include platform_data header file
MAINTAINERS | 1 +
arch/arm/mach-orion5x/common.c | 2 +-
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 2 +-
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 2 +-
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 2 +-
arch/arm/mach-orion5x/wnr854t-setup.c | 2 +-
arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +-
arch/arm/plat-orion/common.c | 2 +-
include/linux/platform_data/b53.h | 2 +-
include/linux/platform_data/dsa.h | 68 ++++++++++++++++++++
include/linux/platform_data/mv88e6xxx.h | 2 +-
include/net/dsa.h | 61 +-----------------
12 files changed, 79 insertions(+), 69 deletions(-)
create mode 100644 include/linux/platform_data/dsa.h
--
2.17.1
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH net-next 1/3] net: dsa: Split platform data to header file
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
@ 2019-01-15 23:06 ` Florian Fainelli
2019-01-16 22:29 ` Andrew Lunn
2019-01-15 23:06 ` [PATCH net-next 2/3] ARM: orion5x: Include platform_data/dsa.h Florian Fainelli
` (4 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Florian Fainelli @ 2019-01-15 23:06 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement, Russell King,
Vivien Didelot, David S. Miller, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Andrew Morton, Nicolas Ferre, Arnd Bergmann,
open list,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support
Instead of having net/dsa.h contain both the internal switch tree/driver
structures, split the relevant platform_data parts into
include/linux/platform_data/dsa.h and make that header be included by
net/dsa.h in order not to break any setup. A subsequent set of patches
will update code including net/dsa.h to include only the platform_data
header.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
MAINTAINERS | 1 +
include/linux/platform_data/dsa.h | 68 +++++++++++++++++++++++++++++++
include/net/dsa.h | 61 +--------------------------
3 files changed, 70 insertions(+), 60 deletions(-)
create mode 100644 include/linux/platform_data/dsa.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 4d04cebb4a71..a592b9992b46 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10576,6 +10576,7 @@ F: Documentation/devicetree/bindings/net/dsa/
F: net/dsa/
F: include/net/dsa.h
F: include/linux/dsa/
+F: include/linux/platform_data/dsa.h
F: drivers/net/dsa/
NETWORKING [GENERAL]
diff --git a/include/linux/platform_data/dsa.h b/include/linux/platform_data/dsa.h
new file mode 100644
index 000000000000..d4d9bf2060a6
--- /dev/null
+++ b/include/linux/platform_data/dsa.h
@@ -0,0 +1,68 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DSA_PDATA_H
+#define __DSA_PDATA_H
+
+struct device;
+struct net_device;
+
+#define DSA_MAX_SWITCHES 4
+#define DSA_MAX_PORTS 12
+#define DSA_RTABLE_NONE -1
+
+struct dsa_chip_data {
+ /*
+ * How to access the switch configuration registers.
+ */
+ struct device *host_dev;
+ int sw_addr;
+
+ /*
+ * Reference to network devices
+ */
+ struct device *netdev[DSA_MAX_PORTS];
+
+ /* set to size of eeprom if supported by the switch */
+ int eeprom_len;
+
+ /* Device tree node pointer for this specific switch chip
+ * used during switch setup in case additional properties
+ * and resources needs to be used
+ */
+ struct device_node *of_node;
+
+ /*
+ * The names of the switch's ports. Use "cpu" to
+ * designate the switch port that the cpu is connected to,
+ * "dsa" to indicate that this port is a DSA link to
+ * another switch, NULL to indicate the port is unused,
+ * or any other string to indicate this is a physical port.
+ */
+ char *port_names[DSA_MAX_PORTS];
+ struct device_node *port_dn[DSA_MAX_PORTS];
+
+ /*
+ * An array of which element [a] indicates which port on this
+ * switch should be used to send packets to that are destined
+ * for switch a. Can be NULL if there is only one switch chip.
+ */
+ s8 rtable[DSA_MAX_SWITCHES];
+};
+
+struct dsa_platform_data {
+ /*
+ * Reference to a Linux network interface that connects
+ * to the root switch chip of the tree.
+ */
+ struct device *netdev;
+ struct net_device *of_netdev;
+
+ /*
+ * Info structs describing each of the switch chips
+ * connected via this network interface.
+ */
+ int nr_chips;
+ struct dsa_chip_data *chip;
+};
+
+
+#endif /* __DSA_PDATA_H */
diff --git a/include/net/dsa.h b/include/net/dsa.h
index b3eefe8e18fd..6178b648d08a 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -21,6 +21,7 @@
#include <linux/ethtool.h>
#include <linux/net_tstamp.h>
#include <linux/phy.h>
+#include <linux/platform_data/dsa.h>
#include <net/devlink.h>
#include <net/switchdev.h>
@@ -44,66 +45,6 @@ enum dsa_tag_protocol {
DSA_TAG_LAST, /* MUST BE LAST */
};
-#define DSA_MAX_SWITCHES 4
-#define DSA_MAX_PORTS 12
-
-#define DSA_RTABLE_NONE -1
-
-struct dsa_chip_data {
- /*
- * How to access the switch configuration registers.
- */
- struct device *host_dev;
- int sw_addr;
-
- /*
- * Reference to network devices
- */
- struct device *netdev[DSA_MAX_PORTS];
-
- /* set to size of eeprom if supported by the switch */
- int eeprom_len;
-
- /* Device tree node pointer for this specific switch chip
- * used during switch setup in case additional properties
- * and resources needs to be used
- */
- struct device_node *of_node;
-
- /*
- * The names of the switch's ports. Use "cpu" to
- * designate the switch port that the cpu is connected to,
- * "dsa" to indicate that this port is a DSA link to
- * another switch, NULL to indicate the port is unused,
- * or any other string to indicate this is a physical port.
- */
- char *port_names[DSA_MAX_PORTS];
- struct device_node *port_dn[DSA_MAX_PORTS];
-
- /*
- * An array of which element [a] indicates which port on this
- * switch should be used to send packets to that are destined
- * for switch a. Can be NULL if there is only one switch chip.
- */
- s8 rtable[DSA_MAX_SWITCHES];
-};
-
-struct dsa_platform_data {
- /*
- * Reference to a Linux network interface that connects
- * to the root switch chip of the tree.
- */
- struct device *netdev;
- struct net_device *of_netdev;
-
- /*
- * Info structs describing each of the switch chips
- * connected via this network interface.
- */
- int nr_chips;
- struct dsa_chip_data *chip;
-};
-
struct packet_type;
struct dsa_switch;
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 2/3] ARM: orion5x: Include platform_data/dsa.h
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 1/3] " Florian Fainelli
@ 2019-01-15 23:06 ` Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 3/3] net: dsa: Include platform_data header file Florian Fainelli
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Florian Fainelli @ 2019-01-15 23:06 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement, Russell King,
Vivien Didelot, David S. Miller, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Andrew Morton, Nicolas Ferre, Arnd Bergmann,
open list,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support
Now that we have split the DSA platform data structures from the main
net/dsa.h header file, include only the relevant header file.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
arch/arm/mach-orion5x/common.c | 2 +-
arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | 2 +-
arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | 2 +-
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c | 2 +-
arch/arm/mach-orion5x/wnr854t-setup.c | 2 +-
arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +-
arch/arm/plat-orion/common.c | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch/arm/mach-orion5x/common.c b/arch/arm/mach-orion5x/common.c
index 83a7ec4c16d0..c67f92bfa30e 100644
--- a/arch/arm/mach-orion5x/common.c
+++ b/arch/arm/mach-orion5x/common.c
@@ -20,7 +20,7 @@
#include <linux/delay.h>
#include <linux/clk-provider.h>
#include <linux/cpu.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <asm/page.h>
#include <asm/setup.h>
#include <asm/system_misc.h>
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
index a3c1336d30c9..c65ab7db36ad 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c
@@ -16,7 +16,7 @@
#include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h>
#include <linux/ethtool.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
index 252efe29bd1a..76b8138d9d79 100644
--- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c
@@ -17,7 +17,7 @@
#include <linux/mv643xx_eth.h>
#include <linux/ethtool.h>
#include <linux/i2c.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
index f4f1dbe1d91d..5f388a1ed1e4 100644
--- a/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
+++ b/arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
@@ -18,7 +18,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/ethtool.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c
index d162d4c7f85d..83589a28a491 100644
--- a/arch/arm/mach-orion5x/wnr854t-setup.c
+++ b/arch/arm/mach-orion5x/wnr854t-setup.c
@@ -15,7 +15,7 @@
#include <linux/mtd/physmap.h>
#include <linux/mv643xx_eth.h>
#include <linux/ethtool.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index 9250bb2e429c..cea08d4a2597 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -18,7 +18,7 @@
#include <linux/leds.h>
#include <linux/gpio_keys.h>
#include <linux/input.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
#include <asm/mach/pci.h>
diff --git a/arch/arm/plat-orion/common.c b/arch/arm/plat-orion/common.c
index a2399fd66e97..a6c81ce00f52 100644
--- a/arch/arm/plat-orion/common.c
+++ b/arch/arm/plat-orion/common.c
@@ -18,7 +18,7 @@
#include <linux/clkdev.h>
#include <linux/mv643xx_eth.h>
#include <linux/mv643xx_i2c.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
#include <linux/platform_data/dma-mv_xor.h>
#include <linux/platform_data/usb-ehci-orion.h>
#include <plat/common.h>
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH net-next 3/3] net: dsa: Include platform_data header file
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 1/3] " Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 2/3] ARM: orion5x: Include platform_data/dsa.h Florian Fainelli
@ 2019-01-15 23:06 ` Florian Fainelli
2019-01-16 10:23 ` [PATCH net-next 0/3] net: dsa: Split platform data to " Arnd Bergmann
` (2 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Florian Fainelli @ 2019-01-15 23:06 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, Jason Cooper, Andrew Lunn,
Sebastian Hesselbarth, Gregory Clement, Russell King,
Vivien Didelot, David S. Miller, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Andrew Morton, Nicolas Ferre, Arnd Bergmann,
open list,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support
b53 and mv88e6xxx support passing platform_data, and now that we have
split the platform_data portion from the main net/dsa.h header file,
include only the relevant parts.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
include/linux/platform_data/b53.h | 2 +-
include/linux/platform_data/mv88e6xxx.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/platform_data/b53.h b/include/linux/platform_data/b53.h
index 8eaef2f2b691..c3b61ead41f2 100644
--- a/include/linux/platform_data/b53.h
+++ b/include/linux/platform_data/b53.h
@@ -20,7 +20,7 @@
#define __B53_H
#include <linux/kernel.h>
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
struct b53_platform_data {
/* Must be first such that dsa_register_switch() can access it */
diff --git a/include/linux/platform_data/mv88e6xxx.h b/include/linux/platform_data/mv88e6xxx.h
index f63af2955ea0..963730b44aea 100644
--- a/include/linux/platform_data/mv88e6xxx.h
+++ b/include/linux/platform_data/mv88e6xxx.h
@@ -2,7 +2,7 @@
#ifndef __DSA_MV88E6XXX_H
#define __DSA_MV88E6XXX_H
-#include <net/dsa.h>
+#include <linux/platform_data/dsa.h>
struct dsa_mv88e6xxx_pdata {
/* Must be first, such that dsa_register_switch() can access this
--
2.17.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 0/3] net: dsa: Split platform data to header file
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
` (2 preceding siblings ...)
2019-01-15 23:06 ` [PATCH net-next 3/3] net: dsa: Include platform_data header file Florian Fainelli
@ 2019-01-16 10:23 ` Arnd Bergmann
2019-01-17 1:16 ` Andrew Lunn
2019-01-17 19:32 ` David Miller
5 siblings, 0 replies; 11+ messages in thread
From: Arnd Bergmann @ 2019-01-16 10:23 UTC (permalink / raw)
To: Florian Fainelli
Cc: Networking, Jason Cooper, Andrew Lunn, Sebastian Hesselbarth,
Gregory Clement, Russell King, Vivien Didelot, David S. Miller,
Mauro Carvalho Chehab, Greg Kroah-Hartman, Andrew Morton,
Nicolas Ferre, open list,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support
On Wed, Jan 16, 2019 at 12:06 AM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> Hi all,
>
> This patch series decouples the DSA platform data structures from
> net/dsa.h which was getting used for all sorts of DSA related
> structures.
Nice cleanup!
> It would probably make sense for this series to go via David's net-next
> tree to avoid conflicts on the ARM part, since we cannot obviously
> include a header that does not yet exist.
Agreed,
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 1/3] net: dsa: Split platform data to header file
2019-01-15 23:06 ` [PATCH net-next 1/3] " Florian Fainelli
@ 2019-01-16 22:29 ` Andrew Lunn
2019-01-16 23:06 ` Florian Fainelli
0 siblings, 1 reply; 11+ messages in thread
From: Andrew Lunn @ 2019-01-16 22:29 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Jason Cooper, Arnd Bergmann, Greg Kroah-Hartman,
Gregory Clement, Russell King, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Mauro Carvalho Chehab, Andrew Morton, Vivien Didelot, open list,
Sebastian Hesselbarth
> diff --git a/include/net/dsa.h b/include/net/dsa.h
> index b3eefe8e18fd..6178b648d08a 100644
> --- a/include/net/dsa.h
> +++ b/include/net/dsa.h
> @@ -21,6 +21,7 @@
> #include <linux/ethtool.h>
> #include <linux/net_tstamp.h>
> #include <linux/phy.h>
> +#include <linux/platform_data/dsa.h>
> #include <net/devlink.h>
> #include <net/switchdev.h>
Hi Florian
Could there be one more patch at the end which removes this? I think
it is here just as an intermediary step?
Thanks
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 1/3] net: dsa: Split platform data to header file
2019-01-16 22:29 ` Andrew Lunn
@ 2019-01-16 23:06 ` Florian Fainelli
2019-01-16 23:50 ` Florian Fainelli
0 siblings, 1 reply; 11+ messages in thread
From: Florian Fainelli @ 2019-01-16 23:06 UTC (permalink / raw)
To: Andrew Lunn
Cc: netdev, Jason Cooper, Arnd Bergmann, Greg Kroah-Hartman,
Gregory Clement, Russell King, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Mauro Carvalho Chehab, Andrew Morton, Vivien Didelot, open list,
Sebastian Hesselbarth
On 1/16/19 2:29 PM, Andrew Lunn wrote:
>> diff --git a/include/net/dsa.h b/include/net/dsa.h
>> index b3eefe8e18fd..6178b648d08a 100644
>> --- a/include/net/dsa.h
>> +++ b/include/net/dsa.h
>> @@ -21,6 +21,7 @@
>> #include <linux/ethtool.h>
>> #include <linux/net_tstamp.h>
>> #include <linux/phy.h>
>> +#include <linux/platform_data/dsa.h>
>> #include <net/devlink.h>
>> #include <net/switchdev.h>
>
> Hi Florian
>
> Could there be one more patch at the end which removes this? I think
> it is here just as an intermediary step?
Yes, we can have only dsa2.c and legacy.c include that file from there
on, I will resubmit with that change, thanks!
--
Florian
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 1/3] net: dsa: Split platform data to header file
2019-01-16 23:06 ` Florian Fainelli
@ 2019-01-16 23:50 ` Florian Fainelli
2019-01-17 1:17 ` Andrew Lunn
0 siblings, 1 reply; 11+ messages in thread
From: Florian Fainelli @ 2019-01-16 23:50 UTC (permalink / raw)
To: Andrew Lunn
Cc: netdev, Jason Cooper, Arnd Bergmann, Greg Kroah-Hartman,
Gregory Clement, Russell King, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Mauro Carvalho Chehab, Andrew Morton, Vivien Didelot, open list,
Sebastian Hesselbarth
On 1/16/19 3:06 PM, Florian Fainelli wrote:
> On 1/16/19 2:29 PM, Andrew Lunn wrote:
>>> diff --git a/include/net/dsa.h b/include/net/dsa.h
>>> index b3eefe8e18fd..6178b648d08a 100644
>>> --- a/include/net/dsa.h
>>> +++ b/include/net/dsa.h
>>> @@ -21,6 +21,7 @@
>>> #include <linux/ethtool.h>
>>> #include <linux/net_tstamp.h>
>>> #include <linux/phy.h>
>>> +#include <linux/platform_data/dsa.h>
>>> #include <net/devlink.h>
>>> #include <net/switchdev.h>
>>
>> Hi Florian
>>
>> Could there be one more patch at the end which removes this? I think
>> it is here just as an intermediary step?
>
> Yes, we can have only dsa2.c and legacy.c include that file from there
> on, I will resubmit with that change, thanks!
We actually need to keep that include in there, because we use
DSA_MAX_SWITCHES in net/dsa.h and splitting that define away could be a
bit tedious since it is used by dsa_platform_data which was exposed before.
Another option could be to not expose dsa_platform_data all, only
dsa_chip_data which describes a single switch, and then we can have a
nice and lean platform_data/dsa.h file that only has a few definitions.
Which route do you prefer?
--
Florian
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 0/3] net: dsa: Split platform data to header file
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
` (3 preceding siblings ...)
2019-01-16 10:23 ` [PATCH net-next 0/3] net: dsa: Split platform data to " Arnd Bergmann
@ 2019-01-17 1:16 ` Andrew Lunn
2019-01-17 19:32 ` David Miller
5 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2019-01-17 1:16 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, Jason Cooper, Arnd Bergmann, Greg Kroah-Hartman,
Gregory Clement, Russell King, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Mauro Carvalho Chehab, Andrew Morton, Vivien Didelot, open list,
Sebastian Hesselbarth
On Tue, Jan 15, 2019 at 03:06:10PM -0800, Florian Fainelli wrote:
> Hi all,
>
> This patch series decouples the DSA platform data structures from
> net/dsa.h which was getting used for all sorts of DSA related
> structures.
>
> It would probably make sense for this series to go via David's net-next
> tree to avoid conflicts on the ARM part, since we cannot obviously
> include a header that does not yet exist.
>
> No functional changes intended.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 1/3] net: dsa: Split platform data to header file
2019-01-16 23:50 ` Florian Fainelli
@ 2019-01-17 1:17 ` Andrew Lunn
0 siblings, 0 replies; 11+ messages in thread
From: Andrew Lunn @ 2019-01-17 1:17 UTC (permalink / raw)
To: Florian Fainelli
Cc: open list, Jason Cooper, Arnd Bergmann, netdev, Gregory Clement,
Russell King, Vivien Didelot, Greg Kroah-Hartman,
Mauro Carvalho Chehab, Andrew Morton, David S. Miller,
moderated list:ARM/Marvell Dove/MV78xx0/Orion SOC support,
Sebastian Hesselbarth
On Wed, Jan 16, 2019 at 03:50:44PM -0800, Florian Fainelli wrote:
> On 1/16/19 3:06 PM, Florian Fainelli wrote:
> > On 1/16/19 2:29 PM, Andrew Lunn wrote:
> >>> diff --git a/include/net/dsa.h b/include/net/dsa.h
> >>> index b3eefe8e18fd..6178b648d08a 100644
> >>> --- a/include/net/dsa.h
> >>> +++ b/include/net/dsa.h
> >>> @@ -21,6 +21,7 @@
> >>> #include <linux/ethtool.h>
> >>> #include <linux/net_tstamp.h>
> >>> #include <linux/phy.h>
> >>> +#include <linux/platform_data/dsa.h>
> >>> #include <net/devlink.h>
> >>> #include <net/switchdev.h>
> >>
> >> Hi Florian
> >>
> >> Could there be one more patch at the end which removes this? I think
> >> it is here just as an intermediary step?
> >
> > Yes, we can have only dsa2.c and legacy.c include that file from there
> > on, I will resubmit with that change, thanks!
>
> We actually need to keep that include in there, because we use
> DSA_MAX_SWITCHES in net/dsa.h and splitting that define away could be a
> bit tedious since it is used by dsa_platform_data which was exposed before.
Hi Florian
O.K, so lets keep the patchset as it is.
Thanks
Andrew
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH net-next 0/3] net: dsa: Split platform data to header file
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
` (4 preceding siblings ...)
2019-01-17 1:16 ` Andrew Lunn
@ 2019-01-17 19:32 ` David Miller
5 siblings, 0 replies; 11+ messages in thread
From: David Miller @ 2019-01-17 19:32 UTC (permalink / raw)
To: f.fainelli
Cc: netdev, jason, andrew, sebastian.hesselbarth, gregory.clement,
linux, vivien.didelot, mchehab+samsung, gregkh, akpm,
nicolas.ferre, arnd, linux-kernel, linux-arm-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 15 Jan 2019 15:06:10 -0800
> This patch series decouples the DSA platform data structures from
> net/dsa.h which was getting used for all sorts of DSA related
> structures.
>
> It would probably make sense for this series to go via David's net-next
> tree to avoid conflicts on the ARM part, since we cannot obviously
> include a header that does not yet exist.
>
> No functional changes intended.
Series applied, thanks Florian.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-01-17 19:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-15 23:06 [PATCH net-next 0/3] net: dsa: Split platform data to header file Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 1/3] " Florian Fainelli
2019-01-16 22:29 ` Andrew Lunn
2019-01-16 23:06 ` Florian Fainelli
2019-01-16 23:50 ` Florian Fainelli
2019-01-17 1:17 ` Andrew Lunn
2019-01-15 23:06 ` [PATCH net-next 2/3] ARM: orion5x: Include platform_data/dsa.h Florian Fainelli
2019-01-15 23:06 ` [PATCH net-next 3/3] net: dsa: Include platform_data header file Florian Fainelli
2019-01-16 10:23 ` [PATCH net-next 0/3] net: dsa: Split platform data to " Arnd Bergmann
2019-01-17 1:16 ` Andrew Lunn
2019-01-17 19:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).