From: Minfei Huang Date: Tue, 17 May 2016 07:58:41 +0000 (+0800) Subject: nvme: use UINT_MAX for max discard sectors X-Git-Tag: v4.1.12-102.0.20170601_1400~69 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a21d433bdd78d68a2a3d8d321f17d4adffd268c1;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Jens Axboe (cherry picked from commit bd0fc2884ca4d1516da1aa5cf44385e24dc23c29) Orabug: 25130845 Signed-off-by: Ashok Vairavan Reviewed-by: Martin K. Petersen --- diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 3f42fb76e1793..ad275f2f660f0 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -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); }