projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
UBI: avoid unnecessary division operations
[linux-2.6-block.git]
/
drivers
/
mtd
/
ubi
/
vmt.c
diff --git
a/drivers/mtd/ubi/vmt.c
b/drivers/mtd/ubi/vmt.c
index 5be58d85c6393c53c2be0f4693ff8a9bd13e40b3..7402025ded94a0418478340a6ba478926d1d7415 100644
(file)
--- 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)
goto fail;
}
- n = vol->alignment
% ubi->min_io_size
;
+ n = vol->alignment
& (ubi->min_io_size - 1)
;
if (vol->alignment != 1 && n) {
ubi_err("alignment is not multiple of min I/O unit");
goto fail;