Skip to content

Commit d4047cf

Browse files
ChaitanayaKulkarniChristoph Hellwig
authored andcommitted
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 <[email protected]> Reviewed-by: Sagi Grimberg <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent a87835e commit d4047cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2873,7 +2873,7 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
28732873
return ret;
28742874
}
28752875
page_shift = NVME_CAP_MPSMIN(ctrl->cap) + 12;
2876-
ctrl->sqsize = min_t(int, NVME_CAP_MQES(ctrl->cap), ctrl->sqsize);
2876+
ctrl->sqsize = min_t(u16, NVME_CAP_MQES(ctrl->cap), ctrl->sqsize);
28772877

28782878
if (ctrl->vs >= NVME_VS(1, 1, 0))
28792879
ctrl->subsystem = NVME_CAP_NSSRC(ctrl->cap);

0 commit comments

Comments
 (0)