Commit 6da2a94
net: dsa: rework switch addition and removal
This patch removes the unnecessary index argument from the
dsa_dst_add_ds and dsa_dst_del_ds functions and renames them to
dsa_tree_add_switch and dsa_tree_remove_switch respectively.
In addition to a more explicit scope, we now check the presence of an
existing switch with the same index directly within dsa_tree_add_switch.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 1ca28ec commit 6da2a94
1 file changed
+27
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 97 | | |
112 | 98 | | |
113 | 99 | | |
| |||
484 | 470 | | |
485 | 471 | | |
486 | 472 | | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
487 | 494 | | |
488 | 495 | | |
489 | 496 | | |
| |||
762 | 769 | | |
763 | 770 | | |
764 | 771 | | |
765 | | - | |
766 | | - | |
767 | | - | |
768 | 772 | | |
769 | 773 | | |
770 | 774 | | |
| |||
773 | 777 | | |
774 | 778 | | |
775 | 779 | | |
776 | | - | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
777 | 783 | | |
778 | 784 | | |
779 | 785 | | |
| |||
801 | 807 | | |
802 | 808 | | |
803 | 809 | | |
804 | | - | |
| 810 | + | |
805 | 811 | | |
806 | 812 | | |
807 | 813 | | |
| |||
843 | 849 | | |
844 | 850 | | |
845 | 851 | | |
| 852 | + | |
846 | 853 | | |
847 | 854 | | |
848 | 855 | | |
849 | | - | |
| 856 | + | |
850 | 857 | | |
851 | 858 | | |
852 | 859 | | |
| |||
0 commit comments