diff options
author | Kyungmin Park <kyungmin.park@samsung.com> | 2008-05-21 21:32:18 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-07-24 06:32:54 -0400 |
commit | cadb40ccc16a26a738f1cbc963e35b21edd93e79 (patch) | |
tree | acd1d5d02ecda07634f1c49432ddb39cd9f5d7fd /drivers/mtd/ubi/eba.c | |
parent | a0fd1efd488092951f310fdb777b8a540cf84dcb (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/eba.c')
-rw-r--r-- | drivers/mtd/ubi/eba.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 7ce91ca742b1..37d778447943 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c | |||
@@ -752,7 +752,7 @@ int ubi_eba_write_leb_st(struct ubi_device *ubi, struct ubi_volume *vol, | |||
752 | /* If this is the last LEB @len may be unaligned */ | 752 | /* If this is the last LEB @len may be unaligned */ |
753 | len = ALIGN(data_size, ubi->min_io_size); | 753 | len = ALIGN(data_size, ubi->min_io_size); |
754 | else | 754 | else |
755 | ubi_assert(len % ubi->min_io_size == 0); | 755 | ubi_assert(!(len & (ubi->min_io_size - 1))); |
756 | 756 | ||
757 | vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_NOFS); | 757 | vid_hdr = ubi_zalloc_vid_hdr(ubi, GFP_NOFS); |
758 | if (!vid_hdr) | 758 | if (!vid_hdr) |