]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: use unsigned int for page order fix 2
authorHugh Dickins <hughd@google.com>
Wed, 21 Oct 2015 22:03:30 +0000 (09:03 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Oct 2015 22:03:30 +0000 (09:03 +1100)
Some configs now end up with MAX_ORDER and pageblock_order having
different types: silence compiler warning in __free_one_page().

Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c

index 239700bc75c6f645c7706f7b3afe9b304e3baa23..94bb8a0bfcdae720325577cdcf843eba57e21f78 100644 (file)
@@ -675,7 +675,7 @@ static inline void __free_one_page(struct page *page,
                 * pageblock. Without this, pageblock isolation
                 * could cause incorrect freepage accounting.
                 */
-               max_order = min(MAX_ORDER, pageblock_order + 1);
+               max_order = min_t(unsigned int, MAX_ORDER, pageblock_order + 1);
        } else {
                __mod_zone_freepage_state(zone, 1 << order, migratetype);
        }