Commit a4ed53466a289a4139405bf7190c78a8e9d8debf

Authored by Wei Yongjun
Committed by Johannes Berg
1 parent 768be59f30

mac80211: use list_move instead of list_del/list_add

Using list_move() instead of list_del() + list_add().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Showing 1 changed file with 1 additions and 2 deletions Side-by-side Diff

net/mac80211/offchannel.c
... ... @@ -233,8 +233,7 @@
233 233 u32 dur = dep->duration;
234 234 dep->duration = dur - roc->duration;
235 235 roc->duration = dur;
236   - list_del(&dep->list);
237   - list_add(&dep->list, &roc->list);
  236 + list_move(&dep->list, &roc->list);
238 237 }
239 238 }
240 239 out_unlock: