Re: [RFC 01/20] net: dsa: introduce a dsa_port structure

2016-04-27 Thread Andrew Lunn
> @@ -230,6 +231,13 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, > struct device *parent) > for (i = 0; i < DSA_MAX_PORTS; i++) { > char *name; > > + dp[i] = devm_kzalloc(parent, sizeof(*dp), GFP_KERNEL); > + if (dp[i] == NULL) > +

Re: [RFC 01/20] net: dsa: introduce a dsa_port structure

2016-04-27 Thread Andrew Lunn
> @@ -230,6 +231,13 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, > struct device *parent) > for (i = 0; i < DSA_MAX_PORTS; i++) { > char *name; > > + dp[i] = devm_kzalloc(parent, sizeof(*dp), GFP_KERNEL); > + if (dp[i] == NULL) > +

[RFC 01/20] net: dsa: introduce a dsa_port structure

2016-04-27 Thread Vivien Didelot
Introduce a new dsa_port structure, used to store port-centric information, such as a pointer to its DSA switch and its port number. It will later contains further data, such as its bridge device. This is a first step towards implementing cross-chip port operations. Signed-off-by: Vivien Didelot

[RFC 01/20] net: dsa: introduce a dsa_port structure

2016-04-27 Thread Vivien Didelot
Introduce a new dsa_port structure, used to store port-centric information, such as a pointer to its DSA switch and its port number. It will later contains further data, such as its bridge device. This is a first step towards implementing cross-chip port operations. Signed-off-by: Vivien Didelot