summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorMinfei Huang <mnghuan@gmail.com>2016-05-17 15:58:41 +0800
committerJens Axboe <axboe@fb.com>2016-06-07 22:23:12 -0600
commitbd0fc2884ca4d1516da1aa5cf44385e24dc23c29 (patch)
treeedbefd1f620711cf47c8f7af659a747c75f239af /drivers/nvme
parentc55a2fd4bb16bcdd8c42e3d64fccd326416b7492 (diff)
downloadlinux-0-day-bd0fc2884ca4d1516da1aa5cf44385e24dc23c29.tar.gz
linux-0-day-bd0fc2884ca4d1516da1aa5cf44385e24dc23c29.tar.xz
nvme: use UINT_MAX for max discard sectors
It's more elegant to use UINT_MAX to represent the max value of type unsigned int. So replace the actual value by using this define. Signed-off-by: Minfei Huang <mnghuan@gmail.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 24f91fbd253c8..99a95bad3ce4b 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -781,7 +781,7 @@ static void nvme_config_discard(struct nvme_ns *ns)
ns->queue->limits.discard_alignment = logical_block_size;
ns->queue->limits.discard_granularity = logical_block_size;
- blk_queue_max_discard_sectors(ns->queue, 0xffffffff);
+ blk_queue_max_discard_sectors(ns->queue, UINT_MAX);
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, ns->queue);
}