]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
nvme: use UINT_MAX for max discard sectors
authorMinfei Huang <mnghuan@gmail.com>
Tue, 17 May 2016 07:58:41 +0000 (15:58 +0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 1 Jun 2017 20:41:27 +0000 (13:41 -0700)
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>
(cherry picked from commit bd0fc2884ca4d1516da1aa5cf44385e24dc23c29)

Orabug: 25130845

Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/nvme/host/core.c

index 3f42fb76e17932a5e0816aa67629af8066aec9de..ad275f2f660f0e6569a6864f1211f2c7df05ab7e 100644 (file)
@@ -735,7 +735,7 @@ static void nvme_config_discard(struct nvme_ns *ns)
        ns->queue->limits.discard_zeroes_data = 0;
        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);
 }