Skip to content

Commit 80e653f

Browse files
martin-gpykeithbusch
authored andcommitted
nvme-core: use nvme_is_io_ctrl() for I/O controller check
Replace the current I/O controller check in nvme_init_non_mdts_limits() with the helper nvme_is_io_ctrl() function to maintain consistency with similar checks in other parts of the code and improve code readability. Signed-off-by: Martin George <marting@netapp.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
1 parent f7e9a61 commit 80e653f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/nvme/host/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3370,7 +3370,7 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
33703370
else
33713371
ctrl->max_zeroes_sectors = 0;
33723372

3373-
if (ctrl->subsys->subtype != NVME_NQN_NVME ||
3373+
if (!nvme_is_io_ctrl(ctrl) ||
33743374
!nvme_id_cns_ok(ctrl, NVME_ID_CNS_CS_CTRL) ||
33753375
test_bit(NVME_CTRL_SKIP_ID_CNS_CS, &ctrl->flags))
33763376
return 0;

0 commit comments

Comments
 (0)