Commit e81d00a
net: mvpp2: use port_count to remove ports
As discussed in [1], there is no need to iterate over child nodes to
remove the list of ports. Instead, a loop up to `port_count` ports can
be used, and is in fact more reliable in case the child node
availability changes.
The suggested approach removes the need for the `fwnode` and
`port_fwnode` variables in mvpp2_remove() as well.
Link: https://lore.kernel.org/all/ZqdRgDkK1PzoI2Pf@shell.armlinux.org.uk/ [1]
Suggested-by: Russell King <linux@armlinux.org.uk>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 80d021b commit e81d00a
1 file changed
+7
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7655 | 7655 | | |
7656 | 7656 | | |
7657 | 7657 | | |
7658 | | - | |
7659 | | - | |
7660 | | - | |
7661 | | - | |
7662 | | - | |
7663 | | - | |
| 7658 | + | |
| 7659 | + | |
7664 | 7660 | | |
7665 | 7661 | | |
7666 | 7662 | | |
| |||
7677 | 7673 | | |
7678 | 7674 | | |
7679 | 7675 | | |
7680 | | - | |
7681 | | - | |
7682 | | - | |
| 7676 | + | |
7683 | 7677 | | |
7684 | 7678 | | |
7685 | 7679 | | |
7686 | | - | |
7687 | | - | |
7688 | | - | |
7689 | | - | |
7690 | | - | |
7691 | | - | |
| 7680 | + | |
| 7681 | + | |
| 7682 | + | |
7692 | 7683 | | |
7693 | 7684 | | |
7694 | 7685 | | |
| |||
7711 | 7702 | | |
7712 | 7703 | | |
7713 | 7704 | | |
7714 | | - | |
| 7705 | + | |
7715 | 7706 | | |
7716 | 7707 | | |
7717 | 7708 | | |
| |||
0 commit comments