nvme: remove redundant BUILD_BUG_ON check
PATCH 1/1 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 <[email protected]>
--- drivers/nvme/host/core.c | 3 --- 1 file changed, 3 deletions(-)
drivers/nvme/host/core.c +0 -3
@@ -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);
Signature · 1 line
2.43.0
Reviewed-by Sagi Grimberg <[email protected]>
Quoted 6 lines · Guixin Liu
Remove redundant
BUILD_BUG_ONcheck of structnvme_dsm_range, it's already checked innvme_init_ctrl().Signed-off-by Guixin Liu <[email protected]>---
Looks good.
Reviewed-by Chaitanya Kulkarni <[email protected]>
-ck
Quoted 2 lines · Guixin Liu
Remove redundant
BUILD_BUG_ONcheck of structnvme_dsm_range, it's already checked innvme_init_ctrl().
Looks good:
Reviewed-by Christoph Hellwig <[email protected]>