Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1385995 > unrolled thread

[PATCH] Use MICRO UINT_MAX instead of actual value

Started byMinfei Huang <mnghuan@gmail.com>
First post2016-04-25 05:20 +0200
Last post2016-04-25 12:10 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] Use MICRO UINT_MAX instead of actual value Minfei Huang <mnghuan@gmail.com> - 2016-04-25 05:20 +0200
    Re: [PATCH] Use MICRO UINT_MAX instead of actual value Sagi Grimberg <sagi@grimberg.me> - 2016-04-25 11:50 +0200
      Re: [PATCH] Use MICRO UINT_MAX instead of actual value Minfei Huang <mnghuan@gmail.com> - 2016-04-25 12:10 +0200

#1385995 — [PATCH] Use MICRO UINT_MAX instead of actual value

FromMinfei Huang <mnghuan@gmail.com>
Date2016-04-25 05:20 +0200
Subject[PATCH] Use MICRO UINT_MAX instead of actual value
Message-ID<rrFe1-7fN-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1386181

FromSagi Grimberg <sagi@grimberg.me>
Date2016-04-25 11:50 +0200
Message-ID<rrLjr-3xc-9@gated-at.bofh.it>
In reply to#1385995
> 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?

[toc] | [prev] | [next] | [standalone]


#1386194

FromMinfei Huang <mnghuan@gmail.com>
Date2016-04-25 12:10 +0200
Message-ID<rrLCO-3W5-11@gated-at.bofh.it>
In reply to#1386181
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web