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 <[email protected]>
---
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
> 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.
You mean macro right?
On 04/25/16 at 12:44P, Sagi Grimberg wrote:
>
> >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.
>
> You mean macro right?
Yep. Sorry for the typo error.
Thanks
Minfei
Ping.
Any comment is appreciate.
Thanks
Minfei
On 04/25/16 at 11:13P, Minfei Huang wrote:
> 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 <[email protected]>
> ---
> 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
>