]> git.baikalelectronics.ru Git - kernel.git/commit
Clean up relay_alloc_page_array() slightly by using vzalloc rather than vmalloc and...
authorJesper Juhl <jj@chaosbits.net>
Thu, 4 Nov 2010 20:44:41 +0000 (21:44 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Nov 2010 15:21:34 +0000 (08:21 -0700)
commite0164f6fdddffe8f7f1f1e327a773f4b67179c62
treeb1e2aeafa2ade41e7b64a0025fa050f3be83d5c7
parentd157cf1fd7018d985ddbe2ae1e95573435385a8c
Clean up relay_alloc_page_array() slightly by using vzalloc rather than vmalloc and memset

We can optimize kernel/relay.c::relay_alloc_page_array() slightly by
using vzalloc.  The patch makes these changes:

 - use vzalloc instead of vmalloc+memset.
 - remove redundant local variable 'array'.
 - declare local 'pa_size' as const.

Cuts down nicely on both source and object-code size.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Pekka Enberg <penberg@kernel.org>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/relay.c