nvme-core: use u16 type for ctrl->sqsize
In nvme_init_identify() when calculating submission queue size use u16 instead of int type in the min_t() since target variable ctrl->sqsize is of type u16. Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
a87835e9ec
commit
d4047cf994
@ -2873,7 +2873,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
page_shift = NVME_CAP_MPSMIN(ctrl->cap) + 12;
|
page_shift = NVME_CAP_MPSMIN(ctrl->cap) + 12;
|
||||||
ctrl->sqsize = min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->sqsize);
|
ctrl->sqsize = min_t(u16, NVME_CAP_MQES(ctrl->cap), ctrl->sqsize);
|
||||||
|
|
||||||
if (ctrl->vs >= NVME_VS(1, 1, 0))
|
if (ctrl->vs >= NVME_VS(1, 1, 0))
|
||||||
ctrl->subsystem = NVME_CAP_NSSRC(ctrl->cap);
|
ctrl->subsystem = NVME_CAP_NSSRC(ctrl->cap);
|
||||||
|
Loading…
Reference in New Issue
Block a user