mtd: nand: use ALIGN where possible
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sun Oct 24 20:59:08 EDT 2010
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=cda320915db00a07e5c4cdfc79806c3b80c0c7f2
Commit: cda320915db00a07e5c4cdfc79806c3b80c0c7f2
Parent: 861fae1818db2ef09e6f3a836816fb1c2c402666
Author: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
AuthorDate: Wed Sep 29 19:43:50 2010 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Oct 25 00:52:50 2010 +0100
mtd: nand: use ALIGN where possible
Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/nand_bbt.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 5fedf4a..a2a4e17 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -737,8 +737,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
/* Calc length */
len = (size_t) (numblocks >> sft);
/* Make it page aligned ! */
- len = (len + (mtd->writesize - 1)) &
- ~(mtd->writesize - 1);
+ len = ALIGN(len, mtd->writesize);
/* Preset the buffer with 0xff */
memset(buf, 0xff, len +
(len >> this->page_shift)* mtd->oobsize);
More information about the linux-mtd-cvs
mailing list