diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-11-04 01:37:31 +0300 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-11-03 16:01:38 -0700 |
commit | 5f436e5ef170e5d3301bf5777a3c7c048295db1c (patch) | |
tree | acfff8c6db9e87715efe8c0b76c23c843f073b23 /drivers/nvme/host/lightnvm.c | |
parent | b7ceb7d50048d0dd4830f106f0fb7f5424031598 (diff) |
nvme: lightnvm: clean up a data type
"nlb_pr_rq" can't be more than u32 because "len" is a u32. Later we
truncate it to u32 anyway when we calculate min_t().
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme/host/lightnvm.c')
-rw-r--r-- | drivers/nvme/host/lightnvm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 133c8396ec93..e0b7b95813bc 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -282,7 +282,7 @@ static int nvme_nvm_get_l2p_tbl(struct request_queue *q, u64 slba, u32 nlb, struct nvme_dev *dev = ns->dev; struct nvme_nvm_command c = {}; u32 len = queue_max_hw_sectors(q) << 9; - u64 nlb_pr_rq = len / sizeof(u64); + u32 nlb_pr_rq = len / sizeof(u64); u64 cmd_slba = slba; void *entries; int ret = 0; @@ -294,7 +294,7 @@ static int nvme_nvm_get_l2p_tbl(struct request_queue *q, u64 slba, u32 nlb, return -ENOMEM; while (nlb) { - u32 cmd_nlb = min_t(u32, nlb_pr_rq, nlb); + u32 cmd_nlb = min(nlb_pr_rq, nlb); c.l2p.slba = cpu_to_le64(cmd_slba); c.l2p.nlb = cpu_to_le32(cmd_nlb); |