]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/ARM: fix ARMs __ffs() to conform to avoid warning with NO_BOOTMEM
authorSantosh Shilimkar <santosh.shilimkar@ti.com>
Fri, 3 Jan 2014 03:09:57 +0000 (14:09 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 3 Jan 2014 03:09:57 +0000 (14:09 +1100)
commite054c24c9b36ac19e1e700e29ddf19ed29cff68e
tree23e42aaa1f921886d5e4b9da4850c6dc5b330d86
parent68abcdf54742a06de9ec52cbb05b6bdd27e6bdab
mm/ARM: fix ARMs __ffs() to conform to avoid warning with NO_BOOTMEM

Building ARM with NO_BOOTMEM generates below warning.

mm/nobootmem.c: In function _____free_pages_memory___:
mm/nobootmem.c:88:11: warning: comparison of distinct pointer types lacks a cast

order = min(MAX_ORDER - 1UL, __ffs(start));

ARM's __ffs() differs from other architectures in that it ends up being
an int, whereas almost everyone else is unsigned long.

So fix ARMs __ffs() to conform to other architectures.  Suggested by
Russell King.

Some more details in below thread -
https://lkml.org/lkml/2013/12/9/807

Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arm/include/asm/bitops.h