From patchwork Thu Sep 6 05:20:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1411921 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 4C7C8DFFCF for ; Thu, 6 Sep 2012 05:21:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751492Ab2IFFUz (ORCPT ); Thu, 6 Sep 2012 01:20:55 -0400 Received: from mail-qc0-f174.google.com ([209.85.216.174]:36088 "EHLO mail-qc0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751004Ab2IFFUy (ORCPT ); Thu, 6 Sep 2012 01:20:54 -0400 Received: by qcro28 with SMTP id o28so590983qcr.19 for ; Wed, 05 Sep 2012 22:20:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=0i/AuxZ4vf9fNqFXTrvSL5PrULi8rxpEHkIBBLyYilk=; b=RC90Mrckk3yGNwmXiwt+XTofeFzI7gRoEju1HZGEAybVUjDDhny5qWUawwcrzcIOqu 9TyMU4eoS2kaGuHegl069+cz3R1bviwntkuQCnzAiX/tqWd9w1EWT76Zew5wzwHPAUtl 9MzLmqIpstRAlkDZd8e2Wbc7xaoUyjpsAiyDEmvtiurUHW0MgC3C5Mp1gTox+nYAiIUr sqRl2CJfnbUTN8jcK1Uc7Sr8ayb0mmlua8cyyk7q7BiLCKfbmLTtgsifgYUF2RYSEmCK fxRWHIHX0RtWSXMbb+ruPiYjD6cB8Wh5jvh2ARDELGLSFTiKkiIE0hOg/S2KJFf1l8Vs DnlA== MIME-Version: 1.0 Received: by 10.224.196.132 with SMTP id eg4mr2376296qab.93.1346908853529; Wed, 05 Sep 2012 22:20:53 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Wed, 5 Sep 2012 22:20:53 -0700 (PDT) Date: Thu, 6 Sep 2012 13:20:53 +0800 Message-ID: Subject: [PATCH] mac80211: use list_move instead of list_del/list_add From: Wei Yongjun To: linville@tuxdriver.com, johannes@sipsolutions.net Cc: yongjun_wei@trendmicro.com.cn, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Wei Yongjun 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 --- net/mac80211/offchannel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c index 635c325..7fbf99d 100644 --- a/net/mac80211/offchannel.c +++ b/net/mac80211/offchannel.c @@ -227,8 +227,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: