There's no need to use two variables, 'ret' and 'm'. This is a minor cleanup patch, but it will allow next patch to clean the way tracing is done. Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Signed-off-by: Ezequiel Garcia <elezegarcia@xxxxxxxxx> --- mm/slob.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/slob.c b/mm/slob.c index 083959a..3f4dc9a 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -427,7 +427,6 @@ out: static __always_inline void * __do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller) { - unsigned int *m; int align = max(ARCH_KMALLOC_MINALIGN, ARCH_SLAB_MINALIGN); void *ret; @@ -439,12 +438,12 @@ __do_kmalloc_node(size_t size, gfp_t gfp, int node, unsigned long caller) if (!size) return ZERO_SIZE_PTR; - m = slob_alloc(size + align, gfp, align, node); + ret = slob_alloc(size + align, gfp, align, node); - if (!m) + if (!ret) return NULL; - *m = size; - ret = (void *)m + align; + *(unsigned int *)ret = size; + ret += align; trace_kmalloc_node(caller, ret, size, size + align, gfp, node); -- 1.7.8.6 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>