From: Wei Yongjun Date: Thu, 6 Sep 2012 05:20:53 +0000 (+0800) Subject: mac80211: use list_move instead of list_del/list_add X-Git-Tag: upstream/snapshot3+hdmi~6565^2~30^2~48^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4ed53466a289a4139405bf7190c78a8e9d8debf;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 507121d..83608ac 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -233,8 +233,7 @@ static void ieee80211_hw_roc_start(struct work_struct *work) u32 dur = dep->duration; dep->duration = dur - roc->duration; roc->duration = dur; - list_del(&dep->list); - list_add(&dep->list, &roc->list); + list_move(&dep->list, &roc->list); } } out_unlock: