Use list_move instead of combination of list_del() and list_add()
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: Gilles Muller <[email protected]>
Cc: Nicolas Palix <[email protected]>
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Russell King <[email protected]>
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Neil Brown <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Maciej Sosnowski <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Dan Carpenter <[email protected]>
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Thomas Gleixner <[email protected]>
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Dave Kleikamp <[email protected]>
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Eric Paris <[email protected]>
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Jaroslav Kysela <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Christoph Lameter <[email protected]>
Cc: KAMEZAWA Hiroyuki <[email protected]>
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: [email protected]
---
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
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Robert Love <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
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
On Tue, 2011-03-15 at 15:53 -0700, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <[email protected]>
> Cc: "James E.J. Bottomley" <[email protected]>
> Cc: Robert Love <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> 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
From: Kirill A. Shutemov <[email protected]>
Signed-off-by: Kirill A. Shutemov <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Robert Love <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Robert Love <[email protected]>
---
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);
On Tue, 2011-03-15 at 16:57 -0700, Robert Love wrote:
> From: Kirill A. Shutemov <[email protected]>
>
> Signed-off-by: Kirill A. Shutemov <[email protected]>
> Cc: "James E.J. Bottomley" <[email protected]>
> Cc: Robert Love <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
You can junk the cc's; they're mostly annotations for git-send-email
> Acked-by: Robert Love <[email protected]>
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
On 03/16/2011 04:23 AM, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: Russell King <[email protected]>
> Cc: [email protected]
> ---
> 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 <[email protected]>
--
viresh
At Wed, 16 Mar 2011 00:53:24 +0200,
Kirill A. Shutemov wrote:
>
> Signed-off-by: Kirill A. Shutemov <[email protected]>
> Cc: Jaroslav Kysela <[email protected]>
> Cc: Takashi Iwai <[email protected]>
> Cc: [email protected]
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
>
On Tue, 2011-03-15 at 17:53 -0500, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <[email protected]>
> Cc: Tomi Valkeinen <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> drivers/video/omap/blizzard.c | 3 +--
> drivers/video/omap/hwa742.c | 3 +--
> 2 files changed, 2 insertions(+), 4 deletions(-)
Acked-by: Tomi Valkeinen <[email protected]>
Tomi
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 <[email protected]>
> >
> > Signed-off-by: Kirill A. Shutemov <[email protected]>
> > Cc: "James E.J. Bottomley" <[email protected]>
> > Cc: Robert Love <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
>
> You can junk the cc's; they're mostly annotations for git-send-email
>
> > Acked-by: Robert Love <[email protected]>
>
> 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 <[email protected]>
Let me know if you, or anyone else, wants me to resend the patch with
the Signed-off line.
//Rob
Reviewed-by: Christoph Lameter <[email protected]>
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 <[email protected]>
> Cc: Julia Lawall <[email protected]>
> Cc: Gilles Muller <[email protected]>
> Cc: Nicolas Palix <[email protected]>
> Cc: [email protected]
> ---
> 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
>
>
On Tue, Mar 15, 2011 at 5:53 PM, Kirill A. Shutemov
<[email protected]> wrote:
> Signed-off-by: Kirill A. Shutemov <[email protected]>
Acked-by: Dave Kleikamp <[email protected]>
> ---
> ?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
>
>
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 <[email protected]>
> > Cc: Tomi Valkeinen <[email protected]>
> > Cc: [email protected]
> > Cc: [email protected]
> > ---
> > drivers/video/omap/blizzard.c | 3 +--
> > drivers/video/omap/hwa742.c | 3 +--
> > 2 files changed, 2 insertions(+), 4 deletions(-)
>
> Acked-by: Tomi Valkeinen <[email protected]>
On Wed, Mar 16, 2011 at 12:53:19AM +0200, Kirill A. Shutemov wrote:
> Signed-off-by: Kirill A. Shutemov <[email protected]>
> Cc: Tejun Heo <[email protected]>
> Cc: [email protected]
> ---
> drivers/video/vermilion/vermilion.c | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
Both applied, thanks.