Message ID | 20210210135657.35284-2-colyli@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] bcache: correct return value in register_nvdimm_meta() | expand |
On 2/10/21 06:00, Coly Li wrote: > Kernel test robot reports the build-in u64/u32 in init_owner_info() > doesn't work for m68k arch, the explict 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 <lkp@intel.com> > Signed-off-by: Coly Li <colyli@suse.de> > Cc: Jianpeng Ma <jianpeng.ma@intel.com> > Cc: Qiaowei Ren <qiaowei.ren@intel.com> Looks good. Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
diff --git a/drivers/md/bcache/nvm-pages.c b/drivers/md/bcache/nvm-pages.c index c350dcd696dd..8be761467d8f 100644 --- a/drivers/md/bcache/nvm-pages.c +++ b/drivers/md/bcache/nvm-pages.c @@ -521,7 +521,7 @@ static int init_owner_info(struct bch_nvm_namespace *ns) only_set->owner_list_size = owner_list_head->size; only_set->owner_list_used = owner_list_head->used; - remove_owner_space(ns, 0, ns->pages_offset/ns->page_size); + remove_owner_space(ns, 0, div_u64(ns->pages_offset, ns->page_size)); for (i = 0; i < owner_list_head->used; i++) { owner_head = &owner_list_head->heads[i];
Kernel test robot reports the build-in u64/u32 in init_owner_info() doesn't work for m68k arch, the explict 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 <lkp@intel.com> Signed-off-by: Coly Li <colyli@suse.de> Cc: Jianpeng Ma <jianpeng.ma@intel.com> Cc: Qiaowei Ren <qiaowei.ren@intel.com> --- drivers/md/bcache/nvm-pages.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)