[PATCH 02/17] mtd: do use mtd->point directly
Brian Norris
computersforpeace at gmail.com
Thu Jan 5 18:03:26 EST 2012
On Mon, Jan 2, 2012 at 4:20 AM, Artem Bityutskiy <dedekind1 at gmail.com> wrote:
> diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
> index c59d642..a01cdad 100644
> --- a/fs/jffs2/erase.c
> +++ b/fs/jffs2/erase.c
> @@ -336,12 +336,11 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
> uint32_t ofs;
> size_t retlen;
> int ret = -EIO;
I think this initialization (ret = -EIO) was unnecessary in the first
place and certainly is unnecessary now. Remove it?
> + unsigned long *wordebuf;
>
> - if (c->mtd->point) {
> - unsigned long *wordebuf;
> -
> - ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
> - &ebuf, NULL);
> + ret = mtd_point(c->mtd, jeb->offset, c->sector_size, &retlen,
> + &ebuf, NULL);
> + if (ret != -EOPNOTSUPP) {
> if (ret) {
> D1(printk(KERN_DEBUG "MTD point failed %d\n", ret));
> goto do_flash_read;
Otherwise, looks OK.
Brian
More information about the linux-mtd
mailing list