Re: [PATCH] [MTD] CORE: Use list_for_each_entry[_safe] where appropriate (2nd attempt)

Jörn Engel
2008-05-19T11:39:15Z

On Sun, 18 May 2008 20:37:13 +0100, Chris Malley wrote:
>
> + list_for_each_entry(tr, &blktrans_majors, list) {
> tr->add_mtd(tr, mtd);
> }

In a couple of places like this the loop body became a single line. So
you could remove the braces as well, while at it.

> diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
> index 07c7011..b7847f2 100644
> --- a/drivers/mtd/mtdpart.c
> +++ b/drivers/mtd/mtdpart.c
> @@ -302,20 +302,14 @@ static int part_block_markbad (struct mtd_info *mtd, loff_t ofs)
>
> int del_mtd_partitions(struct mtd_info *master)
> {
> - struct list_head *node;
> - struct mtd_part *slave;
> + struct mtd_part *slave, *safe;

"next" seems a bit better than "safe".

Rest looks fine to me. So I leave it up to you whether to add those
trivial cosmetics or just leave the patch as-is. Either way, it is an
improvement. Also, having dwmw2 on Cc: improves the chances of this
patch not being ignored. ;)

Reviewed-By: Joern Engel <joern@logfs.org>

Jörn

--
Victory in war is not repetitious.
-- Sun Tzu