UBI fixes for 2.6.25-rc4
Subsystems (2)
Hi Linus,
Please pull UBI fixes from 'for-linus' branch of
git://git.infradead.org/~dedekind/ubi-2.6.git for-linus
to receive the following updates:
drivers/mtd/ubi/build.c | 4 ++-- drivers/mtd/ubi/ubi.h | 10 +++++----- drivers/mtd/ubi/vmt.c | 4 +++- drivers/mtd/ubi/vtbl.c | 1 + 4 files changed, 11 insertions(+), 8 deletions(-)
Adrian Bunk (1):
UBI: mtd/ubi/vtbl.c: fix memory leak
Artem Bityutskiy (1):
UBI: fix error message
Harvey Harrison (1):
UBI: fix sparse errors in ubi.h
S.Çağlar Onur (1):
UBI: silence warning
commit f7f0283776b6fe33f87f6a2ef15b1feb49ef6dac
Author: Adrian Bunk <[email protected]> Date: Mon Mar 3 20:07:52 2008 +0200
UBI: mtd/ubi/vtbl.c: fix memory leak
This patch fixes a memory leak introduced by commit 4ccf8cffa963c7b5bdc6d455ea9417084ee49aa8 and spotted by the Coverity checker.
drivers/mtd/ubi/vtbl.c +1 -0
@@ -519,6 +519,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,if (ubi->autoresize_vol_id !=-1 ) {ubi_err ("more then one auto-resize volume (%d " "and %d)" , ubi->autoresize_vol_id, i); +kfree (vol);return -EINVAL ; }
commit 8eee9f100b1cc3d1b0a701a8626c54422af3c987
Author: Harvey Harrison <[email protected]> Date: Fri Feb 15 10:47:51 2008 +0200
UBI: fix sparse errors in ubi.h
In C, signed 1-bit bitfields can only take the values 0 and -1, only 0 and 1 are ever assigned in current code. Make them unsigned bitfields.
Fixes the (repeated) sparse errors:
drivers/mtd/ubi/ubi.h:220:15: error: dubious one-bit signed bitfield drivers/mtd/ubi/ubi.h:221:17: error: dubious one-bit signed bitfield drivers/mtd/ubi/ubi.h:222:18: error: dubious one-bit signed bitfield drivers/mtd/ubi/ubi.h:223:16: error: dubious one-bit signed bitfield drivers/mtd/ubi/ubi.h:224:20: error: dubious one-bit signed bitfield
drivers/mtd/ubi/ubi.h +5 -5
@@ -217,11 +217,11 @@ struct ubi_volume {void *upd_buf;int *eba_tbl; - int checked:1; - int corrupted:1; - int upd_marker:1; - int updating:1; - int changing_leb:1; + unsigned int checked:1; + unsigned int corrupted:1; + unsigned int upd_marker:1; + unsigned int updating:1; + unsigned int changing_leb:1;#ifdef CONFIG_MTD_UBI_GLUEBI /*
commit 19cd7b7de1804a50264dfd5c6ba3c6d332362a77
Author: Artem Bityutskiy <[email protected]> Date: Tue Feb 12 16:32:35 2008 +0200
UBI: fix error message
Make it print "UBI error: cannot attach mtd4"
instead of "UBI error: cannot attach 4"
drivers/mtd/ubi/build.c +2 -2
@@ -1000,8 +1000,8 @@ static int __init ubi_init(void)mutex_unlock (&ubi_devices_mutex);if (err <0 ) {put_mtd_device (mtd); -printk (KERN_ERR "UBI error: cannot attach %s\n" , - p->name); +printk (KERN_ERR "UBI error: cannot attach mtd%d\n" , + mtd->index); goto out_detach; } }
commit fc398769ac5cbfdf4dc16a7ba657b284abcc92f5
Author: S.Çağlar Onur <[email protected]> Date: Tue Feb 12 13:25:06 2008 +0200
UBI: silence warning
drivers/mtd/ubi/vmt.c: In function `ubi_create_volume':
drivers/mtd/ubi/vmt.c:379: warning: statement with no effect
drivers/mtd/ubi/vmt.c +3 -1
@@ -376,7 +376,9 @@ out_sysfs:get_device (&vol->dev);volume_sysfs_close (vol); out_gluebi: -ubi_destroy_gluebi (vol); +if (ubi_destroy_gluebi (vol)) +dbg_err ("cannot destroy gluebi for volume %d:%d" , + ubi->ubi_num, vol_id); out_cdev:cdev_del (&vol->cdev); out_mapping:
Signature · 2 lines
Best regards, Artem Bityutskiy (Битюцкий Артём)