Skip to content

net: dsa: complete and fix the dsa unbinding

Neil Armstrong lkml netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 1 replyIn review
  2. v25 patches 11 repliesSuperseded
  3. v13 patches 7 repliesSuperseded

Changes in v3 from the cover letter

- make checkpatch happy with 1/5 & 5/5
- fix 5/5 exit path with a goto

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net: dsa: add missing kfree on removenet/dsa/dsa.c+4 -10 replies
2/5net: dsa: add missing dsa_switch mdiobus removenet/dsa/dsa.c+2 -00 replies
3/5net: dsa: complete dsa_switch_destroynet/dsa/dsa.c+37 -00 replies
4/5net: dsa: switch to devm_ calls and remove kfree callsnet/dsa/dsa.c+5 -120 replies
5/5net: dsa: exit probe if no switch were foundnet/dsa/dsa.c+16 -30 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchFlorian Fainelli
1/5
2/5R-b
3/5R-b
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] net: dsa: complete and fix the dsa unbinding

In order to cleanly unbind the dsa core, either as a module removal, or a platform device unbind, switch the allocation the their devm_ counterparts and complete the destroy functions.

First, the missing kfree were added, the remove function were completed then kfree were removed in favor to devm_ calls.

The last patch is an way to cleanly exit the probe when no switch is found in the discover process.

The patches are based on the current net.

v3:
- make checkpatch happy with 1/5 & 5/5
- fix 5/5 exit path with a goto

Neil Armstrong (5):
net: dsa: add missing kfree on remove
net: dsa: add missing dsa_switch mdiobus remove
net: dsa: complete dsa_switch_destroy
net: dsa: switch to devm_ calls and remove kfree calls
net: dsa: exit probe if no switch were found

 net/dsa/dsa.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++----------
 1 file changed, 59 insertions(+), 11 deletions(-)
Signature · 1 line
1.9.1