Lines Matching refs:sz
460 static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_eb() argument
463 return sz >> mtd->erasesize_shift; in mtd_div_by_eb()
464 do_div(sz, mtd->erasesize); in mtd_div_by_eb()
465 return sz; in mtd_div_by_eb()
468 static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_eb() argument
471 return sz & mtd->erasesize_mask; in mtd_mod_by_eb()
472 return do_div(sz, mtd->erasesize); in mtd_mod_by_eb()
475 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_ws() argument
478 return sz >> mtd->writesize_shift; in mtd_div_by_ws()
479 do_div(sz, mtd->writesize); in mtd_div_by_ws()
480 return sz; in mtd_div_by_ws()
483 static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_ws() argument
486 return sz & mtd->writesize_mask; in mtd_mod_by_ws()
487 return do_div(sz, mtd->writesize); in mtd_mod_by_ws()