2012-10-09 06:14:24

by Wei Yongjun

[permalink] [raw]
Subject: [PATCH] ubi: use list_move_tail instead of list_del/list_add_tail

From: Wei Yongjun <[email protected]>

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

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <[email protected]>
---
drivers/mtd/ubi/fastmap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 1a5f53c..5f540c5 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -815,8 +815,7 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
ai->max_sqnum = max_sqnum;

list_for_each_entry_safe(tmp_aeb, _tmp_aeb, &free, u.list) {
- list_del(&tmp_aeb->u.list);
- list_add_tail(&tmp_aeb->u.list, &ai->free);
+ list_move_tail(&tmp_aeb->u.list, &ai->free);
}

/*


2012-10-09 16:19:01

by Richard Weinberger

[permalink] [raw]
Subject: Re: [PATCH] ubi: use list_move_tail instead of list_del/list_add_tail

Am Tue, 9 Oct 2012 14:14:21 +0800
schrieb Wei Yongjun <[email protected]>:

> From: Wei Yongjun <[email protected]>
>
> Using list_move_tail() instead of list_del() + list_add_tail().
>
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
>
> Signed-off-by: Wei Yongjun <[email protected]>

Acked-by: Richard Weinberger <[email protected]>

Thanks,
//richard

2012-10-15 15:15:39

by Artem Bityutskiy

[permalink] [raw]
Subject: Re: [PATCH] ubi: use list_move_tail instead of list_del/list_add_tail

On Tue, 2012-10-09 at 14:14 +0800, Wei Yongjun wrote:
> From: Wei Yongjun <[email protected]>
>
> Using list_move_tail() instead of list_del() + list_add_tail().
>
> dpatch engine is used to auto generate this patch.
> (https://github.com/weiyj/dpatch)
>
> Signed-off-by: Wei Yongjun <[email protected]>

Pushed to linux-ubi.git, thanks!

--
Best Regards,
Artem Bityutskiy


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part