[PATCH v7 14/16] bcache: use div_u64() in init_owner_info()
Coly Li <[email protected]> Sat, 10 Apr 2021 00:43:41 +0800
| Newsgroups | org.01.lists.linux-nvdimm,dev.linux.lists.nvdimm,org.kernel.vger.linux-bcache,org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
Kernel test robot reports the built-in u64/u32 in init_owner_info() doesn't work for m68k arch, the explicit div_u64() should be used. This patch explicit uses div_u64() to do the u64/u32 division on 32bit m68k arch. Reported-by: kernel test robot <[email protected]> Signed-off-by: Coly Li <[email protected]> Cc: Jianpeng Ma <[email protected]> Cc: Qiaowei Ren <[email protected]> --- drivers/md/bcache/nvm-pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/nvm-pages.c b/drivers/md/bcache/nvm-pages.c index c3ab396a45fa..19597ae7ef3e 100644 --- a/drivers/md/bcache/nvm-pages.c +++ b/drivers/md/bcache/nvm-pages.c @@ -405,7 +405,7 @@ static int init_owner_info(struct bch_nvm_namespace *ns) only_set->owner_list_used = owner_list_head->used; /*remove used space*/ - remove_owner_space(ns, 0, ns->pages_offset/ns->page_size); + remove_owner_space(ns, 0, div_u64(ns->pages_offset, ns->page_size)); sys_recs = ns->kaddr + BCH_NVM_PAGES_SYS_RECS_HEAD_OFFSET; // suppose no hole in array -- 2.26.2 _______________________________________________ Linux-nvdimm mailing list -- [email protected] To unsubscribe send an email to [email protected]