From patchwork Wed Sep 5 06:34:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 1405531 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D7DE03FC71 for ; Wed, 5 Sep 2012 06:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751388Ab2IEGeN (ORCPT ); Wed, 5 Sep 2012 02:34:13 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:58275 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750900Ab2IEGeN (ORCPT ); Wed, 5 Sep 2012 02:34:13 -0400 Received: by qaas11 with SMTP id s11so314934qaa.19 for ; Tue, 04 Sep 2012 23:34:12 -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=DfINJEWQXxi0js625NgTWP5ATzvMSO4Hi0sy0/UpTQI=; b=AgFxV0LWDTdpxW6sgf0Onw7G4HFy7hfryIFCtwU0rPgN8wClIBHXeS0NrYNIaXeZAT ToFi/FUJ933UIbcGGI8CwkT6dOGEg+3M0H9pGs0rVJpt5DRoR9nDnmjvLGQHok6roA2N OFcbqqC0LERpQUm36JHdFh+fBHSMjmD3qM6syo+qMiaAbExIcEMyxhmABPgedsrt4mU2 saxCfuVRNlW9vp19PhbnnPugE76fIByDXOFiXNHrZ/NCR8tB918MtxRsY8M0ttg49FAx mRoS8gvFpY9JnuG9Cj/4dyQxjmir4hCwnpyfVRHfpY0UKNw+xY1by4Y0Y+x1BzBbEwa2 QooQ== MIME-Version: 1.0 Received: by 10.224.184.20 with SMTP id ci20mr43607471qab.26.1346826852381; Tue, 04 Sep 2012 23:34:12 -0700 (PDT) Received: by 10.229.146.194 with HTTP; Tue, 4 Sep 2012 23:34:12 -0700 (PDT) Date: Wed, 5 Sep 2012 14:34:12 +0800 Message-ID: Subject: [PATCH] cfg80211: use list_move_tail instead of list_del/list_add_tail From: Wei Yongjun To: johannes@sipsolutions.net, linville@tuxdriver.com, davem@davemloft.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_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun --- net/wireless/reg.c | 6 ++---- 1 file changed, 2 insertions(+), 4 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/wireless/reg.c b/net/wireless/reg.c index 2ded3c7..1ad04e5 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1949,8 +1949,7 @@ static void restore_regulatory_settings(bool reset_user) if (reg_request->initiator != NL80211_REGDOM_SET_BY_USER) continue; - list_del(®_request->list); - list_add_tail(®_request->list, &tmp_reg_req_list); + list_move_tail(®_request->list, &tmp_reg_req_list); } } spin_unlock(®_requests_lock); @@ -2009,8 +2008,7 @@ static void restore_regulatory_settings(bool reset_user) "into the queue\n", reg_request->alpha2[0], reg_request->alpha2[1]); - list_del(®_request->list); - list_add_tail(®_request->list, ®_requests_list); + list_move_tail(®_request->list, ®_requests_list); } spin_unlock(®_requests_lock);