diff options
author | Guixin Liu <kanie@linux.alibaba.com> | 2024-03-20 17:19:49 +0800 |
---|---|---|
committer | Keith Busch <kbusch@kernel.org> | 2024-03-21 10:46:12 -0700 |
commit | 1e1c4bd16e385f0b1b39920ce3aa16bb33fcdb27 (patch) | |
tree | cffb8c4e21a1f8d5200774f511aba9ac22115bb3 /drivers/nvme | |
parent | 0c29f9fa46bbe4fdc218134823d80cf9934ef231 (diff) |
nvme: remove redundant BUILD_BUG_ON check
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>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index fb55b6ac0385..212005933782 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -1803,9 +1803,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); |