Skip to content

Commit a191c9e

Browse files
committed
wireless/mediatek: Replace rcu_swap_protected() with rcu_replace_pointer()
This commit replaces the use of rcu_swap_protected() with the more intuitively appealing rcu_replace_pointer() as a step towards removing rcu_swap_protected(). Link: https://lore.kernel.org/lkml/CAHk-=wiAsJLw1egFEE=Z7-GGtM6wcvtyytXZA1+BHqta4gg6Hw@mail.gmail.com/ Reported-by: Linus Torvalds <[email protected]> Reported-by: "Martin K. Petersen" <[email protected]> [ paulmck: Apply Matthias Brugger feedback. ] Signed-off-by: Paul E. McKenney <[email protected]> Reviewed-by: "Martin K. Petersen" <[email protected]> Acked-by: Kalle Valo <[email protected]> Cc: Felix Fietkau <[email protected]> Cc: Lorenzo Bianconi <[email protected]> Cc: Ryder Lee <[email protected]> Cc: Roy Luo <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]> Cc: <[email protected]>
1 parent 1a271eb commit a191c9e

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/mediatek/mt76

1 file changed

+2
-2
lines changed

drivers/net/wireless/mediatek/mt76/agg-rx.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,8 @@ void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno)
281281
{
282282
struct mt76_rx_tid *tid = NULL;
283283

284-
rcu_swap_protected(wcid->aggr[tidno], tid,
285-
lockdep_is_held(&dev->mutex));
284+
tid = rcu_replace_pointer(wcid->aggr[tidno], tid,
285+
lockdep_is_held(&dev->mutex));
286286
if (tid) {
287287
mt76_rx_aggr_shutdown(dev, tid);
288288
kfree_rcu(tid, rcu_head);

0 commit comments

Comments
 (0)