[PATCH] cfg80211: use list_move_tail instead of list_del/list_add_tail

Subsystems: 802.11 (including cfg80211/nl80211), the rest

STALE5087d

2 messages, 2 authors, 2012-09-05 · open the first message on its own page

[PATCH] cfg80211: use list_move_tail instead of list_del/list_add_tail

From: Wei Yongjun <hidden>
Date: 2012-09-05 06:34:12

From: Wei Yongjun <redacted>

Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <redacted>
---
 net/wireless/reg.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
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(&reg_request->list);
-			list_add_tail(&reg_request->list, &tmp_reg_req_list);
+			list_move_tail(&reg_request->list, &tmp_reg_req_list);
 		}
 	}
 	spin_unlock(&reg_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(&reg_request->list);
-		list_add_tail(&reg_request->list, &reg_requests_list);
+		list_move_tail(&reg_request->list, &reg_requests_list);
 	}
 	spin_unlock(&reg_requests_lock);
 

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] cfg80211: use list_move_tail instead of list_del/list_add_tail

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2012-09-05 13:39:36

On Wed, 2012-09-05 at 14:34 +0800, Wei Yongjun wrote:
From: Wei Yongjun <redacted>

Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <redacted>
Applied, thanks.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help