* [PATCH] nvme-core: use nvme_is_io_ctrl() for I/O controller check
@ 2025-09-22 12:05 Martin George
2025-09-22 17:08 ` Christoph Hellwig
2025-09-22 20:23 ` Keith Busch
0 siblings, 2 replies; 3+ messages in thread
From: Martin George @ 2025-09-22 12:05 UTC (permalink / raw)
To: linux-nvme; +Cc: hch, kbusch, sagi, Martin George
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>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index edfe7a267a4b..a46f0f2d1c37 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3370,7 +3370,7 @@ static int nvme_init_non_mdts_limits(struct nvme_ctrl *ctrl)
else
ctrl->max_zeroes_sectors = 0;
- if (ctrl->subsys->subtype != NVME_NQN_NVME ||
+ if (!nvme_is_io_ctrl(ctrl) ||
!nvme_id_cns_ok(ctrl, NVME_ID_CNS_CS_CTRL) ||
test_bit(NVME_CTRL_SKIP_ID_CNS_CS, &ctrl->flags))
return 0;
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-core: use nvme_is_io_ctrl() for I/O controller check
2025-09-22 12:05 [PATCH] nvme-core: use nvme_is_io_ctrl() for I/O controller check Martin George
@ 2025-09-22 17:08 ` Christoph Hellwig
2025-09-22 20:23 ` Keith Busch
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2025-09-22 17:08 UTC (permalink / raw)
To: Martin George; +Cc: linux-nvme, hch, kbusch, sagi, Martin George
On Mon, Sep 22, 2025 at 05:35:32PM +0530, Martin George wrote:
> 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>
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme-core: use nvme_is_io_ctrl() for I/O controller check
2025-09-22 12:05 [PATCH] nvme-core: use nvme_is_io_ctrl() for I/O controller check Martin George
2025-09-22 17:08 ` Christoph Hellwig
@ 2025-09-22 20:23 ` Keith Busch
1 sibling, 0 replies; 3+ messages in thread
From: Keith Busch @ 2025-09-22 20:23 UTC (permalink / raw)
To: Martin George; +Cc: linux-nvme, hch, sagi, Martin George
On Mon, Sep 22, 2025 at 05:35:32PM +0530, Martin George wrote:
> 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.
Thanks, applied to nvme-6.18.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-22 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-22 12:05 [PATCH] nvme-core: use nvme_is_io_ctrl() for I/O controller check Martin George
2025-09-22 17:08 ` Christoph Hellwig
2025-09-22 20:23 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox