Lines Matching refs:sz
236 static inline uint32_t mtd_div_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_eb() argument
239 return sz >> mtd->erasesize_shift; in mtd_div_by_eb()
240 do_div(sz, mtd->erasesize); in mtd_div_by_eb()
241 return sz; in mtd_div_by_eb()
244 static inline uint32_t mtd_mod_by_eb(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_eb() argument
247 return sz & mtd->erasesize_mask; in mtd_mod_by_eb()
248 return do_div(sz, mtd->erasesize); in mtd_mod_by_eb()
251 static inline uint32_t mtd_div_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_div_by_ws() argument
254 return sz >> mtd->writesize_shift; in mtd_div_by_ws()
255 do_div(sz, mtd->writesize); in mtd_div_by_ws()
256 return sz; in mtd_div_by_ws()
259 static inline uint32_t mtd_mod_by_ws(uint64_t sz, struct mtd_info *mtd) in mtd_mod_by_ws() argument
262 return sz & mtd->writesize_mask; in mtd_mod_by_ws()
263 return do_div(sz, mtd->writesize); in mtd_mod_by_ws()