* [PATCH V2] Use MACRO UINT_MAX instead of actual value
@ 2016-05-17 7:58 Minfei Huang
2016-06-08 2:05 ` Minfei Huang
0 siblings, 1 reply; 2+ messages in thread
From: Minfei Huang @ 2016-05-17 7:58 UTC (permalink / raw)
To: keith.busch, axboe, gpiccoli, sagi; +Cc: linux-nvme, linux-kernel, Minfei Huang
It's more elegant to use MACRO UINT_MAX to represent the max value of
type unsigned int. So replace the actual value by using this MACRO.
Signed-off-by: Minfei Huang <mnghuan@gmail.com>
---
v1:
- fix typo
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH V2] Use MACRO UINT_MAX instead of actual value
2016-05-17 7:58 [PATCH V2] Use MACRO UINT_MAX instead of actual value Minfei Huang
@ 2016-06-08 2:05 ` Minfei Huang
0 siblings, 0 replies; 2+ messages in thread
From: Minfei Huang @ 2016-06-08 2:05 UTC (permalink / raw)
To: keith.busch, axboe, gpiccoli, sagi; +Cc: linux-nvme, linux-kernel
Ping. Any comment is appreciate.
Thanks
Minfei
On 05/17/16 at 03:58P, Minfei Huang wrote:
> It's more elegant to use MACRO UINT_MAX to represent the max value of
> type unsigned int. So replace the actual value by using this MACRO.
>
> Signed-off-by: Minfei Huang <mnghuan@gmail.com>
> ---
> v1:
> - fix typo
> ---
> 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
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-08 2:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-17 7:58 [PATCH V2] Use MACRO UINT_MAX instead of actual value Minfei Huang
2016-06-08 2:05 ` Minfei Huang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox