Skip to content

Commit 6c49b5e

Browse files
committed
Merge branch 'dsa-parsing-stage'
Vivien Didelot says: ==================== net: dsa: parsing stage When registering a DSA switch, there is basically two stages. The first stage is the parsing of the switch device, from either device tree or platform data. It fetches the DSA tree to which it belongs, and validates its ports. The switch device is then added to the tree, and the second stage is called if this was the last switch of the tree. The second stage is the setup of the tree, which validates that the tree is complete, sets up the routing tables, the default CPU port for user ports, sets up the switch drivers and finally the master interfaces, which makes the whole switch fabric functional. This patch series covers the first parsing stage. It fixes the type of the switch and tree indexes to unsigned int, simplifies the tree reference counting and the switch and CPU ports parsing. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 9524846 + 7354fcb commit 6c49b5e

File tree

3 files changed

+179
-140
lines changed

3 files changed

+179
-140
lines changed

include/net/dsa.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct dsa_switch_tree {
116116
struct raw_notifier_head nh;
117117

118118
/* Tree identifier */
119-
u32 tree;
119+
unsigned int index;
120120

121121
/* Number of switches attached to this tree */
122122
struct kref refcount;
@@ -209,7 +209,7 @@ struct dsa_switch {
209209
* Parent switch tree, and switch index.
210210
*/
211211
struct dsa_switch_tree *dst;
212-
int index;
212+
unsigned int index;
213213

214214
/* Listener for switch fabric events */
215215
struct notifier_block nb;

0 commit comments

Comments
 (0)