linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: nobootmem: avoid type warning about alignment value
@ 2013-11-23 23:28 Santosh Shilimkar
  2013-11-24 15:14 ` Sergei Shtylyov
  0 siblings, 1 reply; 17+ messages in thread
From: Santosh Shilimkar @ 2013-11-23 23:28 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-mm, linux-arm-kernel, Santosh Shilimkar, Tejun Heo,
	Andrew Morton

Building ARM with NO_BOOTMEM generates below warning. Using min_t
to find the correct alignment avoids the warning.

Cc: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
 mm/nobootmem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index 2c254d3..8954e43 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -85,7 +85,7 @@ static void __init __free_pages_memory(unsigned long start, unsigned long end)
 	int order;
 
 	while (start < end) {
-		order = min(MAX_ORDER - 1UL, __ffs(start));
+		order = min_t(size_t, MAX_ORDER - 1UL, __ffs(start));
 
 		while (start + (1UL << order) > end)
 			order--;
-- 
1.7.9.5

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-01-15  3:46 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-23 23:28 [PATCH] mm: nobootmem: avoid type warning about alignment value Santosh Shilimkar
2013-11-24 15:14 ` Sergei Shtylyov
2013-11-25 13:57   ` Santosh Shilimkar
2013-11-25 15:56     ` Tejun Heo
2013-12-10  0:39       ` Santosh Shilimkar
2013-12-10  0:50     ` Andrew Morton
2013-12-10  0:54       ` Russell King - ARM Linux
2013-12-10  1:02         ` Santosh Shilimkar
2014-01-12 10:59           ` Russell King - ARM Linux
2014-01-12 15:42             ` Santosh Shilimkar
2014-01-12 15:46               ` Santosh Shilimkar
2014-01-13 12:37               ` Russell King - ARM Linux
2014-01-13 14:27                 ` Santosh Shilimkar
2014-01-13 23:31                   ` Andrew Morton
2014-01-13 23:33                     ` Russell King - ARM Linux
2014-01-13 23:41                       ` Santosh Shilimkar
2014-01-15  3:46             ` Nicolas Pitre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).