* [PATCH] Use MICRO UINT_MAX instead of actual value
@ 2016-04-25 3:13 Minfei Huang
2016-04-25 9:44 ` Sagi Grimberg
2016-04-30 10:13 ` Minfei Huang
0 siblings, 2 replies; 5+ messages in thread
From: Minfei Huang @ 2016-04-25 3:13 UTC (permalink / raw)
To: keith.busch, axboe; +Cc: linux-nvme, linux-kernel, Minfei Huang
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Use MICRO UINT_MAX instead of actual value
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 10:08 ` Minfei Huang
2016-04-30 10:13 ` Minfei Huang
1 sibling, 1 reply; 5+ messages in thread
From: Sagi Grimberg @ 2016-04-25 9:44 UTC (permalink / raw)
To: Minfei Huang, keith.busch, axboe; +Cc: linux-kernel, linux-nvme
> 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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Use MICRO UINT_MAX instead of actual value
2016-04-25 9:44 ` Sagi Grimberg
@ 2016-04-25 10:08 ` Minfei Huang
0 siblings, 0 replies; 5+ messages in thread
From: Minfei Huang @ 2016-04-25 10:08 UTC (permalink / raw)
To: Sagi Grimberg; +Cc: keith.busch, axboe, linux-kernel, linux-nvme
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Use MICRO UINT_MAX instead of actual value
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-30 10:13 ` Minfei Huang
2016-05-16 22:19 ` Guilherme G. Piccoli
1 sibling, 1 reply; 5+ messages in thread
From: Minfei Huang @ 2016-04-30 10:13 UTC (permalink / raw)
To: keith.busch, axboe; +Cc: linux-nvme, linux-kernel
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 <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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Use MICRO UINT_MAX instead of actual value
2016-04-30 10:13 ` Minfei Huang
@ 2016-05-16 22:19 ` Guilherme G. Piccoli
0 siblings, 0 replies; 5+ messages in thread
From: Guilherme G. Piccoli @ 2016-05-16 22:19 UTC (permalink / raw)
To: Minfei Huang; +Cc: keith.busch, axboe, linux-kernel, linux-nvme
On 04/30/2016 07:13 AM, Minfei Huang wrote:
> Ping.
>
> Any comment is appreciate.
Hi Minfei, I guess a good idea would be to resend the patch with the
typo fixed, as a v2 patch. What do you think?
Cheers,
Guilherme
>
> 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 <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
>>
>
> _______________________________________________
> Linux-nvme mailing list
> Linux-nvme@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-nvme
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-05-16 22:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 10:08 ` Minfei Huang
2016-04-30 10:13 ` Minfei Huang
2016-05-16 22:19 ` Guilherme G. Piccoli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox