Skip to content
Snippets Groups Projects
Commit cda32091 authored by Sebastian Andrzej Siewior's avatar Sebastian Andrzej Siewior Committed by David Woodhouse
Browse files

mtd: nand: use ALIGN where possible

parent 861fae18
Branches
Tags
No related merge requests found
...@@ -737,8 +737,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf, ...@@ -737,8 +737,7 @@ static int write_bbt(struct mtd_info *mtd, uint8_t *buf,
/* Calc length */ /* Calc length */
len = (size_t) (numblocks >> sft); len = (size_t) (numblocks >> sft);
/* Make it page aligned ! */ /* Make it page aligned ! */
len = (len + (mtd->writesize - 1)) & len = ALIGN(len, mtd->writesize);
~(mtd->writesize - 1);
/* Preset the buffer with 0xff */ /* Preset the buffer with 0xff */
memset(buf, 0xff, len + memset(buf, 0xff, len +
(len >> this->page_shift)* mtd->oobsize); (len >> this->page_shift)* mtd->oobsize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment