aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/vmt.c
diff options
context:
space:
mode:
authorKyungmin Park <kyungmin.park@samsung.com>2008-05-21 21:32:18 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-07-24 06:32:54 -0400
commitcadb40ccc16a26a738f1cbc963e35b21edd93e79 (patch)
treeacd1d5d02ecda07634f1c49432ddb39cd9f5d7fd /drivers/mtd/ubi/vmt.c
parenta0fd1efd488092951f310fdb777b8a540cf84dcb (diff)
UBI: avoid unnecessary division operations
UBI already checks that @min io size is the power of 2 at io_init. It is save to use bit operations then. Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/vmt.c')
-rw-r--r--drivers/mtd/ubi/vmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index 5be58d85c639..7402025ded94 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -727,7 +727,7 @@ static void paranoid_check_volume(struct ubi_device *ubi, int vol_id)
727 goto fail; 727 goto fail;
728 } 728 }
729 729
730 n = vol->alignment % ubi->min_io_size; 730 n = vol->alignment & (ubi->min_io_size - 1);
731 if (vol->alignment != 1 && n) { 731 if (vol->alignment != 1 && n) {
732 ubi_err("alignment is not multiple of min I/O unit"); 732 ubi_err("alignment is not multiple of min I/O unit");
733 goto fail; 733 goto fail;