linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/13] Coccinelle: introduce list_move.cocci
@ 2011-03-15 22:53 Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination Kirill A. Shutemov
                   ` (12 more replies)
  0 siblings, 13 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, Julia Lawall, Gilles Muller, Nicolas Palix, cocci

Use list_move instead of combination of list_del() and list_add()

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Julia Lawall <julia@diku.dk>
Cc: Gilles Muller <Gilles.Muller@lip6.fr>
Cc: Nicolas Palix <npalix.work@gmail.com>
Cc: cocci@diku.dk
---
 scripts/coccinelle/api/list/list_move.cocci |   41 +++++++++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 scripts/coccinelle/api/list/list_move.cocci

diff --git a/scripts/coccinelle/api/list/list_move.cocci b/scripts/coccinelle/api/list/list_move.cocci
new file mode 100644
index 0000000..2691a8a
--- /dev/null
+++ b/scripts/coccinelle/api/list/list_move.cocci
@@ -0,0 +1,41 @@
+///
+/// Use list_move() instead of combination of list_del() and list_add()
+///
+// Confidence: High
+// Copyright: (C) 2011 Kirill A. Shutemov. GPLv2.
+// Options: -no_includes -include_headers
+
+virtual context
+virtual patch
+virtual org
+virtual report
+
+@depends on context@
+expression a, b;
+@@
+
+* list_del(a);
+* list_add(a, b);
+
+@depends on patch@
+expression a, b;
+@@
+
+- list_del(a);
+- list_add(a, b);
++ list_move(a, b);
+
+@r depends on report || org@
+expression a, b;
+position p;
+@@
+
+ list_del@p(a);
+ list_add(a, b);
+
+@script:python depends on org || report@
+p << r.p;
+@@
+
+msg = "WARNING: list_move() can be used"
+coccilib.report.print_report(p[0], msg)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-16  3:49   ` viresh kumar
  2011-03-15 22:53 ` [PATCH 03/13] dca: " Kirill A. Shutemov
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, Viresh Kumar, Russell King, linux-arm-kernel

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
---
 arch/arm/plat-spear/clock.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-spear/clock.c b/arch/arm/plat-spear/clock.c
index ee4f90e..1d24faf 100644
--- a/arch/arm/plat-spear/clock.c
+++ b/arch/arm/plat-spear/clock.c
@@ -267,9 +267,7 @@ static void change_parent(struct clk *cclk, struct clk *pclk)
 	unsigned long flags;
 
 	spin_lock_irqsave(&clocks_lock, flags);
-	list_del(&cclk->sibling);
-	list_add(&cclk->sibling, &pclk->children);
-
+	list_move(&cclk->sibling, &pclk->children);
 	cclk->pclk = pclk;
 	spin_unlock_irqrestore(&clocks_lock, flags);
 }
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 03/13] dca: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 04/13] dm: " Kirill A. Shutemov
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, Maciej Sosnowski, Andrew Morton,
	David S. Miller, Tejun Heo, Dan Carpenter

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Tejun Heo <tj@kernel.org>
Cc: Dan Carpenter <error27@gmail.com>
---
 drivers/dca/dca-core.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c
index c461eda..4abd089 100644
--- a/drivers/dca/dca-core.c
+++ b/drivers/dca/dca-core.c
@@ -111,10 +111,8 @@ static void unregister_dca_providers(void)
 	/* at this point only one domain in the list is expected */
 	domain = list_first_entry(&dca_domains, struct dca_domain, node);
 
-	list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node) {
-		list_del(&dca->node);
-		list_add(&dca->node, &unregistered_providers);
-	}
+	list_for_each_entry_safe(dca, _dca, &domain->dca_providers, node)
+		list_move(&dca->node, &unregistered_providers);
 
 	dca_free_domain(domain);
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 04/13] dm: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 03/13] dca: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 05/13] scsi: " Kirill A. Shutemov
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kirill A. Shutemov, Neil Brown, dm-devel, linux-raid

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Neil Brown <neilb@suse.de>
Cc: dm-devel@redhat.com
Cc: linux-raid@vger.kernel.org
---
 drivers/md/dm-log-userspace-base.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/md/dm-log-userspace-base.c b/drivers/md/dm-log-userspace-base.c
index aa2e0c3..1021c89 100644
--- a/drivers/md/dm-log-userspace-base.c
+++ b/drivers/md/dm-log-userspace-base.c
@@ -394,8 +394,7 @@ static int flush_by_group(struct log_c *lc, struct list_head *flush_list)
 			group[count] = fe->region;
 			count++;
 
-			list_del(&fe->list);
-			list_add(&fe->list, &tmp_list);
+			list_move(&fe->list, &tmp_list);
 
 			type = fe->type;
 			if (count >= MAX_FLUSH_GROUP_COUNT)
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 05/13] scsi: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (2 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 04/13] dm: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-15 23:52   ` Robert Love
  2011-03-15 23:57   ` [PATCH] " Robert Love
  2011-03-15 22:53 ` [PATCH 06/13] omap: " Kirill A. Shutemov
                   ` (8 subsequent siblings)
  12 siblings, 2 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, James E.J. Bottomley, Robert Love, linux-scsi, devel

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: Robert Love <robert.w.love@intel.com>
Cc: linux-scsi@vger.kernel.org
Cc: devel@open-fcoe.org
---
 drivers/scsi/esp_scsi.c     |    6 ++----
 drivers/scsi/fcoe/libfcoe.c |    6 ++----
 drivers/scsi/scsi_tgt_lib.c |    6 ++----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 5755852..9a1af1d 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -708,8 +708,7 @@ static void esp_maybe_execute_command(struct esp *esp)
 	tp = &esp->target[tgt];
 	lp = dev->hostdata;
 
-	list_del(&ent->list);
-	list_add(&ent->list, &esp->active_cmds);
+	list_move(&ent->list, &esp->active_cmds);
 
 	esp->active_cmd = ent;
 
@@ -1244,8 +1243,7 @@ static int esp_finish_select(struct esp *esp)
 		/* Now that the state is unwound properly, put back onto
 		 * the issue queue.  This command is no longer active.
 		 */
-		list_del(&ent->list);
-		list_add(&ent->list, &esp->queued_cmds);
+		list_move(&ent->list, &esp->queued_cmds);
 		esp->active_cmd = NULL;
 
 		/* Return value ignored by caller, it directly invokes
diff --git a/drivers/scsi/fcoe/libfcoe.c b/drivers/scsi/fcoe/libfcoe.c
index 625c6be..a1f7025 100644
--- a/drivers/scsi/fcoe/libfcoe.c
+++ b/drivers/scsi/fcoe/libfcoe.c
@@ -1004,10 +1004,8 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
 	 * the FCF that answers multicast solicitations, not the others that
 	 * are sending periodic multicast advertisements.
 	 */
-	if (mtu_valid) {
-		list_del(&fcf->list);
-		list_add(&fcf->list, &fip->fcfs);
-	}
+	if (mtu_valid)
+		list_move(&fcf->list, &fip->fcfs);
 
 	/*
 	 * If this is the first validated FCF, note the time and
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index c399be9..4c444b8 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -275,10 +275,8 @@ void scsi_tgt_free_queue(struct Scsi_Host *shost)
 
 	for (i = 0; i < ARRAY_SIZE(qdata->cmd_hash); i++) {
 		list_for_each_entry_safe(tcmd, n, &qdata->cmd_hash[i],
-					 hash_list) {
-			list_del(&tcmd->hash_list);
-			list_add(&tcmd->hash_list, &cmds);
-		}
+					 hash_list)
+			list_move(&tcmd->hash_list, &cmds);
 	}
 
 	spin_unlock_irqrestore(&qdata->cmd_hash_lock, flags);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 06/13] omap: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (3 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 05/13] scsi: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-16 11:43   ` Tomi Valkeinen
  2011-03-15 22:53 ` [PATCH 07/13] vmlfb: " Kirill A. Shutemov
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kirill A. Shutemov, Tomi Valkeinen, linux-fbdev, linux-omap

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-omap@vger.kernel.org
---
 drivers/video/omap/blizzard.c |    3 +--
 drivers/video/omap/hwa742.c   |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/video/omap/blizzard.c b/drivers/video/omap/blizzard.c
index 87785c2..c0504a8 100644
--- a/drivers/video/omap/blizzard.c
+++ b/drivers/video/omap/blizzard.c
@@ -397,8 +397,7 @@ static inline void free_req(struct blizzard_request *req)
 
 	spin_lock_irqsave(&blizzard.req_lock, flags);
 
-	list_del(&req->entry);
-	list_add(&req->entry, &blizzard.free_req_list);
+	list_move(&req->entry, &blizzard.free_req_list);
 	if (!(req->flags & REQ_FROM_IRQ_POOL))
 		up(&blizzard.req_sema);
 
diff --git a/drivers/video/omap/hwa742.c b/drivers/video/omap/hwa742.c
index 0016f77..084aa0a 100644
--- a/drivers/video/omap/hwa742.c
+++ b/drivers/video/omap/hwa742.c
@@ -269,8 +269,7 @@ static inline void free_req(struct hwa742_request *req)
 
 	spin_lock_irqsave(&hwa742.req_lock, flags);
 
-	list_del(&req->entry);
-	list_add(&req->entry, &hwa742.free_req_list);
+	list_move(&req->entry, &hwa742.free_req_list);
 	if (!(req->flags & REQ_FROM_IRQ_POOL))
 		up(&hwa742.req_sema);
 
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 07/13] vmlfb: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (4 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 06/13] omap: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 08/13] JFS: " Kirill A. Shutemov
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kirill A. Shutemov, Tejun Heo, linux-fbdev

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Tejun Heo <tj@kernel.org>
Cc: linux-fbdev@vger.kernel.org
---
 drivers/video/vermilion/vermilion.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/video/vermilion/vermilion.c b/drivers/video/vermilion/vermilion.c
index 931a567..970e43d 100644
--- a/drivers/video/vermilion/vermilion.c
+++ b/drivers/video/vermilion/vermilion.c
@@ -891,8 +891,7 @@ static int vmlfb_set_par(struct fb_info *info)
 	int ret;
 
 	mutex_lock(&vml_mutex);
-	list_del(&vinfo->head);
-	list_add(&vinfo->head, (subsys) ? &global_has_mode : &global_no_mode);
+	list_move(&vinfo->head, (subsys) ? &global_has_mode : &global_no_mode);
 	ret = vmlfb_set_par_locked(vinfo);
 
 	mutex_unlock(&vml_mutex);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 08/13] JFS: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (5 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 07/13] vmlfb: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-21 18:49   ` Dave Kleikamp
  2011-03-15 22:53 ` [PATCH 09/13] audit: " Kirill A. Shutemov
                   ` (5 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kirill A. Shutemov, Dave Kleikamp, jfs-discussion

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Dave Kleikamp <shaggy@kernel.org>
Cc: jfs-discussion@lists.sourceforge.net
---
 fs/jfs/jfs_txnmgr.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index 9466957..8cb7b92 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -2979,12 +2979,9 @@ int jfs_sync(void *arg)
 				 * put back on the anon_list.
 				 */
 
-				/* Take off anon_list */
-				list_del(&jfs_ip->anon_inode_list);
-
-				/* Put on anon_list2 */
-				list_add(&jfs_ip->anon_inode_list,
-					 &TxAnchor.anon_list2);
+				/* Move anon_list -> anon_list2 */
+				list_move(&jfs_ip->anon_inode_list,
+					  &TxAnchor.anon_list2);
 
 				TXN_UNLOCK();
 				iput(ip);
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 09/13] audit: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (6 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 08/13] JFS: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 10/13] clockevent: " Kirill A. Shutemov
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kirill A. Shutemov, Al Viro, Eric Paris

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Paris <eparis@redhat.com>
---
 kernel/audit_tree.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c
index 37b2bea..6fe56d2 100644
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@ -591,8 +591,7 @@ void audit_trim_trees(void)
 
 		tree = container_of(cursor.next, struct audit_tree, list);
 		get_tree(tree);
-		list_del(&cursor);
-		list_add(&cursor, &tree->list);
+		list_move(&cursor, &tree->list);
 		mutex_unlock(&audit_filter_mutex);
 
 		err = kern_path(tree->pathname, 0, &path);
@@ -744,8 +743,7 @@ int audit_tag_tree(char *old, char *new)
 
 		tree = container_of(cursor.next, struct audit_tree, list);
 		get_tree(tree);
-		list_del(&cursor);
-		list_add(&cursor, &tree->list);
+		list_move(&cursor, &tree->list);
 		mutex_unlock(&audit_filter_mutex);
 
 		err = kern_path(tree->pathname, 0, &path2);
@@ -769,10 +767,8 @@ int audit_tag_tree(char *old, char *new)
 
 		mutex_lock(&audit_filter_mutex);
 		spin_lock(&hash_lock);
-		if (!tree->goner) {
-			list_del(&tree->list);
-			list_add(&tree->list, &tree_list);
-		}
+		if (!tree->goner)
+			list_move(&tree->list, &tree_list);
 		spin_unlock(&hash_lock);
 		put_tree(tree);
 	}
@@ -782,8 +778,7 @@ int audit_tag_tree(char *old, char *new)
 
 		tree = container_of(barrier.prev, struct audit_tree, list);
 		get_tree(tree);
-		list_del(&tree->list);
-		list_add(&tree->list, &barrier);
+		list_move(&tree->list, &barrier);
 		mutex_unlock(&audit_filter_mutex);
 
 		if (!failed) {
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 10/13] clockevent: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (7 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 09/13] audit: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-15 22:53 ` [PATCH 11/13] mm: " Kirill A. Shutemov
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel; +Cc: Kirill A. Shutemov, Thomas Gleixner

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/time/clockevents.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index d7395fd..b1fa45d 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -168,8 +168,7 @@ static void clockevents_notify_released(void)
 	while (!list_empty(&clockevents_released)) {
 		dev = list_entry(clockevents_released.next,
 				 struct clock_event_device, list);
-		list_del(&dev->list);
-		list_add(&dev->list, &clockevent_devices);
+		list_move(&dev->list, &clockevent_devices);
 		clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev);
 	}
 }
@@ -221,8 +220,7 @@ void clockevents_exchange_device(struct clock_event_device *old,
 	 */
 	if (old) {
 		clockevents_set_mode(old, CLOCK_EVT_MODE_UNUSED);
-		list_del(&old->list);
-		list_add(&old->list, &clockevents_released);
+		list_move(&old->list, &clockevents_released);
 	}
 
 	if (new) {
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 11/13] mm: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (8 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 10/13] clockevent: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-17 13:54   ` Christoph Lameter
  2011-03-15 22:53 ` [PATCH 12/13] alsa: " Kirill A. Shutemov
                   ` (2 subsequent siblings)
  12 siblings, 1 reply; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, Andrew Morton, Mel Gorman, Rik van Riel,
	Christoph Lameter, KAMEZAWA Hiroyuki, linux-mm

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Rik van Riel <riel@redhat.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: linux-mm@kvack.org
---
 mm/page_alloc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index cdef1d4..55fa2ae 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -863,9 +863,8 @@ static int move_freepages(struct zone *zone,
 		}
 
 		order = page_order(page);
-		list_del(&page->lru);
-		list_add(&page->lru,
-			&zone->free_area[order].free_list[migratetype]);
+		list_move(&page->lru,
+			  &zone->free_area[order].free_list[migratetype]);
 		page += 1 << order;
 		pages_moved += 1 << order;
 	}
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 12/13] alsa: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (9 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 11/13] mm: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-16  6:50   ` Takashi Iwai
  2011-03-15 22:53 ` [PATCH 13/13] perf: " Kirill A. Shutemov
  2011-03-20  9:20 ` [PATCH 01/13] Coccinelle: introduce list_move.cocci Julia Lawall
  12 siblings, 1 reply; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, Jaroslav Kysela, Takashi Iwai, alsa-devel

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
---
 sound/pci/ctxfi/ctvmem.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c
index 65da6e4..b78f3fc 100644
--- a/sound/pci/ctxfi/ctvmem.c
+++ b/sound/pci/ctxfi/ctvmem.c
@@ -52,8 +52,7 @@ get_vm_block(struct ct_vm *vm, unsigned int size)
 
 	if (entry->size == size) {
 		/* Move the vm node from unused list to used list directly */
-		list_del(&entry->list);
-		list_add(&entry->list, &vm->used);
+		list_move(&entry->list, &vm->used);
 		vm->size -= size;
 		block = entry;
 		goto out;
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 13/13] perf: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (10 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 12/13] alsa: " Kirill A. Shutemov
@ 2011-03-15 22:53 ` Kirill A. Shutemov
  2011-03-20  9:20 ` [PATCH 01/13] Coccinelle: introduce list_move.cocci Julia Lawall
  12 siblings, 0 replies; 24+ messages in thread
From: Kirill A. Shutemov @ 2011-03-15 22:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Kirill A. Shutemov, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
---
 tools/perf/util/session.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 105f00b..8b8e04e 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -499,8 +499,7 @@ static void flush_sample_queue(struct perf_session *s,
 					   iter->file_offset);
 
 		os->last_flush = iter->timestamp;
-		list_del(&iter->list);
-		list_add(&iter->list, &os->sample_cache);
+		list_move(&iter->list, &os->sample_cache);
 	}
 
 	if (list_empty(head)) {
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 05/13] scsi: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 05/13] scsi: " Kirill A. Shutemov
@ 2011-03-15 23:52   ` Robert Love
  2011-03-15 23:57   ` [PATCH] " Robert Love
  1 sibling, 0 replies; 24+ messages in thread
From: Robert Love @ 2011-03-15 23:52 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-kernel, James E.J. Bottomley, linux-scsi, devel

On Tue, 2011-03-15 at 15:53 -0700, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
> Cc: Robert Love <robert.w.love@intel.com>
> Cc: linux-scsi@vger.kernel.org
> Cc: devel@open-fcoe.org
> ---
>  drivers/scsi/esp_scsi.c     |    6 ++----
>  drivers/scsi/fcoe/libfcoe.c |    6 ++----

Hi Kirill,

   libfcoe.c doesn't exist anymore in the scsi-misc tree with recent
fcoe transport changes. Specifically, the change you're trying to make
should be to fcoe_ctlr.c.

   I'll resend an updated patch that applies to scsi-misc and has my
Ack.

Thanks, //Rob


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH] scsi: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 05/13] scsi: " Kirill A. Shutemov
  2011-03-15 23:52   ` Robert Love
@ 2011-03-15 23:57   ` Robert Love
  2011-03-16  1:52     ` James Bottomley
  1 sibling, 1 reply; 24+ messages in thread
From: Robert Love @ 2011-03-15 23:57 UTC (permalink / raw)
  To: kirill; +Cc: James.Bottomley, linux-kernel, linux-scsi, devel

From: Kirill A. Shutemov <kirill@shutemov.name>

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
Cc: Robert Love <robert.w.love@intel.com>
Cc: linux-scsi@vger.kernel.org
Cc: devel@open-fcoe.org
Acked-by: Robert Love <robert.w.love@intel.com>
---
 drivers/scsi/esp_scsi.c       |    6 ++----
 drivers/scsi/fcoe/fcoe_ctlr.c |    6 ++----
 drivers/scsi/scsi_tgt_lib.c   |    6 ++----
 3 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
index 5755852..9a1af1d 100644
--- a/drivers/scsi/esp_scsi.c
+++ b/drivers/scsi/esp_scsi.c
@@ -708,8 +708,7 @@ static void esp_maybe_execute_command(struct esp *esp)
 	tp = &esp->target[tgt];
 	lp = dev->hostdata;
 
-	list_del(&ent->list);
-	list_add(&ent->list, &esp->active_cmds);
+	list_move(&ent->list, &esp->active_cmds);
 
 	esp->active_cmd = ent;
 
@@ -1244,8 +1243,7 @@ static int esp_finish_select(struct esp *esp)
 		/* Now that the state is unwound properly, put back onto
 		 * the issue queue.  This command is no longer active.
 		 */
-		list_del(&ent->list);
-		list_add(&ent->list, &esp->queued_cmds);
+		list_move(&ent->list, &esp->queued_cmds);
 		esp->active_cmd = NULL;
 
 		/* Return value ignored by caller, it directly invokes
diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index c93f007..fb3a506 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -978,10 +978,8 @@ static void fcoe_ctlr_recv_adv(struct fcoe_ctlr *fip, struct sk_buff *skb)
 	 * the FCF that answers multicast solicitations, not the others that
 	 * are sending periodic multicast advertisements.
 	 */
-	if (mtu_valid) {
-		list_del(&fcf->list);
-		list_add(&fcf->list, &fip->fcfs);
-	}
+	if (mtu_valid)
+		list_move(&fcf->list, &fip->fcfs);
 
 	/*
 	 * If this is the first validated FCF, note the time and
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index c399be9..4c444b8 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -275,10 +275,8 @@ void scsi_tgt_free_queue(struct Scsi_Host *shost)
 
 	for (i = 0; i < ARRAY_SIZE(qdata->cmd_hash); i++) {
 		list_for_each_entry_safe(tcmd, n, &qdata->cmd_hash[i],
-					 hash_list) {
-			list_del(&tcmd->hash_list);
-			list_add(&tcmd->hash_list, &cmds);
-		}
+					 hash_list)
+			list_move(&tcmd->hash_list, &cmds);
 	}
 
 	spin_unlock_irqrestore(&qdata->cmd_hash_lock, flags);


^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH] scsi: use list_move() instead of list_del()/list_add() combination
  2011-03-15 23:57   ` [PATCH] " Robert Love
@ 2011-03-16  1:52     ` James Bottomley
  2011-03-16 21:00       ` Robert Love
  0 siblings, 1 reply; 24+ messages in thread
From: James Bottomley @ 2011-03-16  1:52 UTC (permalink / raw)
  To: Robert Love; +Cc: kirill, linux-kernel, linux-scsi, devel

On Tue, 2011-03-15 at 16:57 -0700, Robert Love wrote:
> From: Kirill A. Shutemov <kirill@shutemov.name>
> 
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
> Cc: Robert Love <robert.w.love@intel.com>
> Cc: linux-scsi@vger.kernel.org
> Cc: devel@open-fcoe.org

You can junk the cc's; they're mostly annotations for git-send-email

> Acked-by: Robert Love <robert.w.love@intel.com>

And this has to be Signed-off-by not Acked-by.  The reason is that
you've resent the patch (and altered it as you transmitted it) so that
makes you part of the signoff chain.  If you ack a patch, it means I can
pick it up from source and you as maintainer didn't actually touch it.

James



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination Kirill A. Shutemov
@ 2011-03-16  3:49   ` viresh kumar
  0 siblings, 0 replies; 24+ messages in thread
From: viresh kumar @ 2011-03-16  3:49 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: linux-kernel, Russell King, linux-arm-kernel, Shiraz HASHIM

On 03/16/2011 04:23 AM, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: Viresh Kumar <viresh.kumar@st.com>
> Cc: Russell King <linux@arm.linux.org.uk>
> Cc: linux-arm-kernel@lists.infradead.org
> ---
>  arch/arm/plat-spear/clock.c |    4 +---
>  1 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/plat-spear/clock.c b/arch/arm/plat-spear/clock.c
> index ee4f90e..1d24faf 100644
> --- a/arch/arm/plat-spear/clock.c
> +++ b/arch/arm/plat-spear/clock.c
> @@ -267,9 +267,7 @@ static void change_parent(struct clk *cclk, struct clk *pclk)
>  	unsigned long flags;
>  
>  	spin_lock_irqsave(&clocks_lock, flags);
> -	list_del(&cclk->sibling);
> -	list_add(&cclk->sibling, &pclk->children);
> -
> +	list_move(&cclk->sibling, &pclk->children);
>  	cclk->pclk = pclk;
>  	spin_unlock_irqrestore(&clocks_lock, flags);
>  }

Acked-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 12/13] alsa: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 12/13] alsa: " Kirill A. Shutemov
@ 2011-03-16  6:50   ` Takashi Iwai
  0 siblings, 0 replies; 24+ messages in thread
From: Takashi Iwai @ 2011-03-16  6:50 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-kernel, Jaroslav Kysela, alsa-devel

At Wed, 16 Mar 2011 00:53:24 +0200,
Kirill A. Shutemov wrote:
> 
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: Jaroslav Kysela <perex@perex.cz>
> Cc: Takashi Iwai <tiwai@suse.de>
> Cc: alsa-devel@alsa-project.org

Thanks, applied now.


Takashi

> ---
>  sound/pci/ctxfi/ctvmem.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c
> index 65da6e4..b78f3fc 100644
> --- a/sound/pci/ctxfi/ctvmem.c
> +++ b/sound/pci/ctxfi/ctvmem.c
> @@ -52,8 +52,7 @@ get_vm_block(struct ct_vm *vm, unsigned int size)
>  
>  	if (entry->size == size) {
>  		/* Move the vm node from unused list to used list directly */
> -		list_del(&entry->list);
> -		list_add(&entry->list, &vm->used);
> +		list_move(&entry->list, &vm->used);
>  		vm->size -= size;
>  		block = entry;
>  		goto out;
> -- 
> 1.7.4.1
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 06/13] omap: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 06/13] omap: " Kirill A. Shutemov
@ 2011-03-16 11:43   ` Tomi Valkeinen
  2011-03-22  6:14     ` Paul Mundt
  0 siblings, 1 reply; 24+ messages in thread
From: Tomi Valkeinen @ 2011-03-16 11:43 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-kernel, Tomi Valkeinen, linux-fbdev, linux-omap

On Tue, 2011-03-15 at 17:53 -0500, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: linux-omap@vger.kernel.org
> ---
>  drivers/video/omap/blizzard.c |    3 +--
>  drivers/video/omap/hwa742.c   |    3 +--
>  2 files changed, 2 insertions(+), 4 deletions(-)

Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH] scsi: use list_move() instead of list_del()/list_add() combination
  2011-03-16  1:52     ` James Bottomley
@ 2011-03-16 21:00       ` Robert Love
  0 siblings, 0 replies; 24+ messages in thread
From: Robert Love @ 2011-03-16 21:00 UTC (permalink / raw)
  To: James Bottomley; +Cc: kirill, linux-kernel, linux-scsi, devel

On Tue, 2011-03-15 at 18:52 -0700, James Bottomley wrote:
> On Tue, 2011-03-15 at 16:57 -0700, Robert Love wrote:
> > From: Kirill A. Shutemov <kirill@shutemov.name>
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > Cc: "James E.J. Bottomley" <James.Bottomley@suse.de>
> > Cc: Robert Love <robert.w.love@intel.com>
> > Cc: linux-scsi@vger.kernel.org
> > Cc: devel@open-fcoe.org
> 
> You can junk the cc's; they're mostly annotations for git-send-email
> 
> > Acked-by: Robert Love <robert.w.love@intel.com>
> 
> And this has to be Signed-off-by not Acked-by.  The reason is that
> you've resent the patch (and altered it as you transmitted it) so that
> makes you part of the signoff chain.  If you ack a patch, it means I can
> pick it up from source and you as maintainer didn't actually touch it.
> 

Thanks for the clarification James.

Signed-off-by: Robert Love <robert.w.love@intel.com>

Let me know if you, or anyone else, wants me to resend the patch with
the Signed-off line.

//Rob


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 11/13] mm: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 11/13] mm: " Kirill A. Shutemov
@ 2011-03-17 13:54   ` Christoph Lameter
  0 siblings, 0 replies; 24+ messages in thread
From: Christoph Lameter @ 2011-03-17 13:54 UTC (permalink / raw)
  To: Kirill A. Shutemov
  Cc: linux-kernel, Andrew Morton, Mel Gorman, Rik van Riel,
	KAMEZAWA Hiroyuki, linux-mm


Reviewed-by: Christoph Lameter <cl@linux.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 01/13] Coccinelle: introduce list_move.cocci
  2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
                   ` (11 preceding siblings ...)
  2011-03-15 22:53 ` [PATCH 13/13] perf: " Kirill A. Shutemov
@ 2011-03-20  9:20 ` Julia Lawall
  12 siblings, 0 replies; 24+ messages in thread
From: Julia Lawall @ 2011-03-20  9:20 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-kernel, Gilles Muller, Nicolas Palix, cocci

Kirill,

Thank you very much for your contribution.  Nevertheless, there is a small 
problem.  In the very last python rule, you use org || report, but 
actually you are not generating org mode.

To make an org mode rule, you should replace the call to

coccilib.report.print_report

by a call to

coccilib.org.print_todo

thanks,
julia


On Wed, 16 Mar 2011, Kirill A. Shutemov wrote:

> Use list_move instead of combination of list_del() and list_add()
> 
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: Julia Lawall <julia@diku.dk>
> Cc: Gilles Muller <Gilles.Muller@lip6.fr>
> Cc: Nicolas Palix <npalix.work@gmail.com>
> Cc: cocci@diku.dk
> ---
>  scripts/coccinelle/api/list/list_move.cocci |   41 +++++++++++++++++++++++++++
>  1 files changed, 41 insertions(+), 0 deletions(-)
>  create mode 100644 scripts/coccinelle/api/list/list_move.cocci
> 
> diff --git a/scripts/coccinelle/api/list/list_move.cocci b/scripts/coccinelle/api/list/list_move.cocci
> new file mode 100644
> index 0000000..2691a8a
> --- /dev/null
> +++ b/scripts/coccinelle/api/list/list_move.cocci
> @@ -0,0 +1,41 @@
> +///
> +/// Use list_move() instead of combination of list_del() and list_add()
> +///
> +// Confidence: High
> +// Copyright: (C) 2011 Kirill A. Shutemov. GPLv2.
> +// Options: -no_includes -include_headers
> +
> +virtual context
> +virtual patch
> +virtual org
> +virtual report
> +
> +@depends on context@
> +expression a, b;
> +@@
> +
> +* list_del(a);
> +* list_add(a, b);
> +
> +@depends on patch@
> +expression a, b;
> +@@
> +
> +- list_del(a);
> +- list_add(a, b);
> ++ list_move(a, b);
> +
> +@r depends on report || org@
> +expression a, b;
> +position p;
> +@@
> +
> + list_del@p(a);
> + list_add(a, b);
> +
> +@script:python depends on org || report@
> +p << r.p;
> +@@
> +
> +msg = "WARNING: list_move() can be used"
> +coccilib.report.print_report(p[0], msg)
> -- 
> 1.7.4.1
> 
> 

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 08/13] JFS: use list_move() instead of list_del()/list_add() combination
  2011-03-15 22:53 ` [PATCH 08/13] JFS: " Kirill A. Shutemov
@ 2011-03-21 18:49   ` Dave Kleikamp
  0 siblings, 0 replies; 24+ messages in thread
From: Dave Kleikamp @ 2011-03-21 18:49 UTC (permalink / raw)
  To: Kirill A. Shutemov; +Cc: linux-kernel, jfs-discussion

On Tue, Mar 15, 2011 at 5:53 PM, Kirill A. Shutemov
<kirill@shutemov.name> wrote:
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

Acked-by: Dave Kleikamp <shaggy@kernel.org>

> ---
>  fs/jfs/jfs_txnmgr.c |    9 +++------
>  1 files changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
> index 9466957..8cb7b92 100644
> --- a/fs/jfs/jfs_txnmgr.c
> +++ b/fs/jfs/jfs_txnmgr.c
> @@ -2979,12 +2979,9 @@ int jfs_sync(void *arg)
>                                 * put back on the anon_list.
>                                 */
>
> -                               /* Take off anon_list */
> -                               list_del(&jfs_ip->anon_inode_list);
> -
> -                               /* Put on anon_list2 */
> -                               list_add(&jfs_ip->anon_inode_list,
> -                                        &TxAnchor.anon_list2);
> +                               /* Move anon_list -> anon_list2 */
> +                               list_move(&jfs_ip->anon_inode_list,
> +                                         &TxAnchor.anon_list2);
>
>                                TXN_UNLOCK();
>                                iput(ip);
> --
> 1.7.4.1
>
>

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 06/13] omap: use list_move() instead of list_del()/list_add() combination
  2011-03-16 11:43   ` Tomi Valkeinen
@ 2011-03-22  6:14     ` Paul Mundt
  0 siblings, 0 replies; 24+ messages in thread
From: Paul Mundt @ 2011-03-22  6:14 UTC (permalink / raw)
  To: Tomi Valkeinen, Kirill A. Shutemov
  Cc: linux-kernel, Tomi Valkeinen, linux-fbdev, linux-omap, Tejun Heo

On Wed, Mar 16, 2011 at 05:13:49PM +0530, Tomi Valkeinen wrote:
> On Tue, 2011-03-15 at 17:53 -0500, Kirill A. Shutemov wrote:
> > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> > Cc: Tomi Valkeinen <tomi.valkeinen@nokia.com>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: linux-omap@vger.kernel.org
> > ---
> >  drivers/video/omap/blizzard.c |    3 +--
> >  drivers/video/omap/hwa742.c   |    3 +--
> >  2 files changed, 2 insertions(+), 4 deletions(-)
> 
> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

On Wed, Mar 16, 2011 at 12:53:19AM +0200, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
> Cc: Tejun Heo <tj@kernel.org>
> Cc: linux-fbdev@vger.kernel.org
> ---
>  drivers/video/vermilion/vermilion.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
Both applied, thanks.

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2011-03-22  6:15 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 22:53 [PATCH 01/13] Coccinelle: introduce list_move.cocci Kirill A. Shutemov
2011-03-15 22:53 ` [PATCH 02/13] plat-spear: use list_move() instead of list_del()/list_add() combination Kirill A. Shutemov
2011-03-16  3:49   ` viresh kumar
2011-03-15 22:53 ` [PATCH 03/13] dca: " Kirill A. Shutemov
2011-03-15 22:53 ` [PATCH 04/13] dm: " Kirill A. Shutemov
2011-03-15 22:53 ` [PATCH 05/13] scsi: " Kirill A. Shutemov
2011-03-15 23:52   ` Robert Love
2011-03-15 23:57   ` [PATCH] " Robert Love
2011-03-16  1:52     ` James Bottomley
2011-03-16 21:00       ` Robert Love
2011-03-15 22:53 ` [PATCH 06/13] omap: " Kirill A. Shutemov
2011-03-16 11:43   ` Tomi Valkeinen
2011-03-22  6:14     ` Paul Mundt
2011-03-15 22:53 ` [PATCH 07/13] vmlfb: " Kirill A. Shutemov
2011-03-15 22:53 ` [PATCH 08/13] JFS: " Kirill A. Shutemov
2011-03-21 18:49   ` Dave Kleikamp
2011-03-15 22:53 ` [PATCH 09/13] audit: " Kirill A. Shutemov
2011-03-15 22:53 ` [PATCH 10/13] clockevent: " Kirill A. Shutemov
2011-03-15 22:53 ` [PATCH 11/13] mm: " Kirill A. Shutemov
2011-03-17 13:54   ` Christoph Lameter
2011-03-15 22:53 ` [PATCH 12/13] alsa: " Kirill A. Shutemov
2011-03-16  6:50   ` Takashi Iwai
2011-03-15 22:53 ` [PATCH 13/13] perf: " Kirill A. Shutemov
2011-03-20  9:20 ` [PATCH 01/13] Coccinelle: introduce list_move.cocci Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).