linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Coly Li <colyli@suse.de>
To: linux-bcache@vger.kernel.org
Cc: linux-block@vger.kernel.org, Coly Li <colyli@suse.de>,
	kernel test robot <lkp@intel.com>,
	Jianpeng Ma <jianpeng.ma@intel.com>,
	Qiaowei Ren <qiaowei.ren@intel.com>
Subject: [PATCH 2/4] bcache: use div_u64() in init_owner_info()
Date: Wed, 10 Feb 2021 21:56:55 +0800	[thread overview]
Message-ID: <20210210135657.35284-2-colyli@suse.de> (raw)
In-Reply-To: <20210210135657.35284-1-colyli@suse.de>

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(-)

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];
-- 
2.26.2


  reply	other threads:[~2021-02-10 13:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 13:56 [PATCH 1/4] bcache: correct return value in register_nvdimm_meta() Coly Li
2021-02-10 13:56 ` Coly Li [this message]
2021-02-10 19:50   ` [PATCH 2/4] bcache: use div_u64() in init_owner_info() Chaitanya Kulkarni
2021-02-10 13:56 ` [PATCH 3/4] bcache: unify code comments style in nvm-pages.c Coly Li
2021-02-10 19:49   ` Chaitanya Kulkarni
2021-02-10 13:56 ` [PATCH 4/4] bcache: fix a typo in nvme-pages.c Coly Li
2021-02-10 19:53   ` Chaitanya Kulkarni
2021-02-10 19:52 ` [PATCH 1/4] bcache: correct return value in register_nvdimm_meta() Chaitanya Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210210135657.35284-2-colyli@suse.de \
    --to=colyli@suse.de \
    --cc=jianpeng.ma@intel.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=qiaowei.ren@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).