OSDN Git Service

nvme: use UINT_MAX for max discard sectors
authorMinfei Huang <mnghuan@gmail.com>
Tue, 17 May 2016 07:58:41 +0000 (15:58 +0800)
committerJens Axboe <axboe@fb.com>
Wed, 8 Jun 2016 04:23:12 +0000 (22:23 -0600)
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>
drivers/nvme/host/core.c

index 24f91fb..99a95ba 100644 (file)
@@ -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);
 }