]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN
authorArnd Bergmann <arnd@arndb.de>
Sun, 5 Aug 2012 15:00:58 +0000 (15:00 +0000)
committerArnd Bergmann <arnd@arndb.de>
Tue, 9 Oct 2012 19:56:28 +0000 (21:56 +0200)
commitbaaf1dd491433a78826150aff7411015de7e9b65
treefc5430d64c1f8ec43797d70a72e9d5500615cfcd
parent48968177312e01737c018fdb2430b703831cbc2e
mm/slob: use min_t() to compare ARCH_SLAB_MINALIGN

The definition of ARCH_SLAB_MINALIGN is architecture dependent
and can be either of type size_t or int. Comparing that value
with ARCH_KMALLOC_MINALIGN can cause harmless warnings on
platforms where they are different. Since both are always
small positive integer numbers, using the size_t type to compare
them is safe and gets rid of the warning.

Without this patch, building ARM collie_defconfig results in:

mm/slob.c: In function '__kmalloc_node':
mm/slob.c:431:152: warning: comparison of distinct pointer types lacks a cast [enabled by default]
mm/slob.c: In function 'kfree':
mm/slob.c:484:153: warning: comparison of distinct pointer types lacks a cast [enabled by default]
mm/slob.c: In function 'ksize':
mm/slob.c:503:153: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
mm/slob.c