* [PATCH] nvme: remove redundant BUILD_BUG_ON check
@ 2024-03-20 9:19 Guixin Liu
2024-03-20 10:46 ` Sagi Grimberg
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Guixin Liu @ 2024-03-20 9:19 UTC (permalink / raw)
To: kbusch, axboe, hch, sagi; +Cc: linux-nvme
Remove redundant BUILD_BUG_ON check of struct nvme_dsm_range, it's
already checked in nvme_init_ctrl().
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
drivers/nvme/host/core.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 00864a634470..04abcda5b12a 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1807,9 +1807,6 @@ static void nvme_config_discard(struct nvme_ns *ns, struct queue_limits *lim)
{
struct nvme_ctrl *ctrl = ns->ctrl;
- BUILD_BUG_ON(PAGE_SIZE / sizeof(struct nvme_dsm_range) <
- NVME_DSM_MAX_RANGES);
-
if (ctrl->dmrsl && ctrl->dmrsl <= nvme_sect_to_lba(ns->head, UINT_MAX))
lim->max_hw_discard_sectors =
nvme_lba_to_sect(ns->head, ctrl->dmrsl);
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] nvme: remove redundant BUILD_BUG_ON check
2024-03-20 9:19 [PATCH] nvme: remove redundant BUILD_BUG_ON check Guixin Liu
@ 2024-03-20 10:46 ` Sagi Grimberg
2024-03-21 17:29 ` Chaitanya Kulkarni
2024-03-21 21:01 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2024-03-20 10:46 UTC (permalink / raw)
To: Guixin Liu, kbusch, axboe, hch; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme: remove redundant BUILD_BUG_ON check
2024-03-20 9:19 [PATCH] nvme: remove redundant BUILD_BUG_ON check Guixin Liu
2024-03-20 10:46 ` Sagi Grimberg
@ 2024-03-21 17:29 ` Chaitanya Kulkarni
2024-03-21 21:01 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2024-03-21 17:29 UTC (permalink / raw)
To: Guixin Liu, kbusch@kernel.org, axboe@kernel.dk, hch@lst.de,
sagi@grimberg.me
Cc: linux-nvme@lists.infradead.org
On 3/20/24 02:19, Guixin Liu wrote:
> Remove redundant BUILD_BUG_ON check of struct nvme_dsm_range, it's
> already checked in nvme_init_ctrl().
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
>
Looks good.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] nvme: remove redundant BUILD_BUG_ON check
2024-03-20 9:19 [PATCH] nvme: remove redundant BUILD_BUG_ON check Guixin Liu
2024-03-20 10:46 ` Sagi Grimberg
2024-03-21 17:29 ` Chaitanya Kulkarni
@ 2024-03-21 21:01 ` Christoph Hellwig
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2024-03-21 21:01 UTC (permalink / raw)
To: Guixin Liu; +Cc: kbusch, axboe, hch, sagi, linux-nvme
On Wed, Mar 20, 2024 at 05:19:49PM +0800, Guixin Liu wrote:
> Remove redundant BUILD_BUG_ON check of struct nvme_dsm_range, it's
> already checked in nvme_init_ctrl().
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-21 21:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-20 9:19 [PATCH] nvme: remove redundant BUILD_BUG_ON check Guixin Liu
2024-03-20 10:46 ` Sagi Grimberg
2024-03-21 17:29 ` Chaitanya Kulkarni
2024-03-21 21:01 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox