Commit 245067e3 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Christoph Hellwig

nvmet: use u32 type for the local variable nsid

In function nvmet_max_nsid() we calculate the max nsid by iterating
over the XArray and store it in the variable nsid that has type of
unsigned long.

Since the value of this function is stored into the subsys->max_nsid
which is of type u32, change the local variable nsid type and the return
type of the same function to u32.
Signed-off-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 86693c43
...@@ -122,11 +122,11 @@ u16 nvmet_zero_sgl(struct nvmet_req *req, off_t off, size_t len) ...@@ -122,11 +122,11 @@ u16 nvmet_zero_sgl(struct nvmet_req *req, off_t off, size_t len)
return 0; return 0;
} }
static unsigned int nvmet_max_nsid(struct nvmet_subsys *subsys) static u32 nvmet_max_nsid(struct nvmet_subsys *subsys)
{ {
unsigned long nsid = 0;
struct nvmet_ns *cur; struct nvmet_ns *cur;
unsigned long idx; unsigned long idx;
u32 nsid = 0;
xa_for_each(&subsys->namespaces, idx, cur) xa_for_each(&subsys->namespaces, idx, cur)
nsid = cur->nsid; nsid = cur->nsid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment