Skip to content

Commit 1e1c4bd

Browse files
guixinliu1995keithbusch
authored andcommitted
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>
1 parent 0c29f9f commit 1e1c4bd

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/nvme/host/core.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1803,9 +1803,6 @@ static void nvme_config_discard(struct nvme_ns *ns, struct queue_limits *lim)
18031803
{
18041804
struct nvme_ctrl *ctrl = ns->ctrl;
18051805

1806-
BUILD_BUG_ON(PAGE_SIZE / sizeof(struct nvme_dsm_range) <
1807-
NVME_DSM_MAX_RANGES);
1808-
18091806
if (ctrl->dmrsl && ctrl->dmrsl <= nvme_sect_to_lba(ns->head, UINT_MAX))
18101807
lim->max_hw_discard_sectors =
18111808
nvme_lba_to_sect(ns->head, ctrl->dmrsl);

0 commit comments

Comments
 (0)