From: mnghuan@gmail.com (Minfei Huang)
Subject: [PATCH] Use MICRO UINT_MAX instead of actual value
Date: Mon, 25 Apr 2016 11:13:29 +0800 [thread overview]
Message-ID: <1461554009-1695-1-git-send-email-mnghuan@gmail.com> (raw)
It's more elegant to use MICRO UINT_MAX to represent the max value of
type unsigned int. So replace the actual value by using this MICRO.
Signed-off-by: Minfei Huang <mnghuan at gmail.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 643f457..2c0bb13 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -597,7 +597,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);
}
--
2.6.3
WARNING: multiple messages have this Message-ID (diff)
From: Minfei Huang <mnghuan@gmail.com>
To: keith.busch@intel.com, axboe@fb.com
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
Minfei Huang <mnghuan@gmail.com>
Subject: [PATCH] Use MICRO UINT_MAX instead of actual value
Date: Mon, 25 Apr 2016 11:13:29 +0800 [thread overview]
Message-ID: <1461554009-1695-1-git-send-email-mnghuan@gmail.com> (raw)
It's more elegant to use MICRO UINT_MAX to represent the max value of
type unsigned int. So replace the actual value by using this MICRO.
Signed-off-by: Minfei Huang <mnghuan@gmail.com>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 643f457..2c0bb13 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -597,7 +597,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);
}
--
2.6.3
next reply other threads:[~2016-04-25 3:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 3:13 Minfei Huang [this message]
2016-04-25 3:13 ` [PATCH] Use MICRO UINT_MAX instead of actual value Minfei Huang
2016-04-25 9:44 ` Sagi Grimberg
2016-04-25 9:44 ` Sagi Grimberg
2016-04-25 10:08 ` Minfei Huang
2016-04-25 10:08 ` Minfei Huang
2016-04-30 10:13 ` Minfei Huang
2016-04-30 10:13 ` Minfei Huang
2016-05-16 22:19 ` Guilherme G. Piccoli
2016-05-16 22:19 ` Guilherme G. Piccoli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461554009-1695-1-git-send-email-mnghuan@gmail.com \
--to=mnghuan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.