From: Huang Shijie Date: Tue, 16 Jun 2009 22:33:42 +0000 (-0700) Subject: lib: do code optimization for radix_tree_lookup() and radix_tree_lookup_slot() X-Git-Tag: v2.6.31-rc1~299^2~65 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b72b71c6cb6ecc564d4d5f9c512a7df269837846;p=pandora-kernel.git lib: do code optimization for radix_tree_lookup() and radix_tree_lookup_slot() radix_tree_lookup() and radix_tree_lookup_slot() have much the same code except for the return value. Introduce radix_tree_lookup_element() to do the real work. /* * is_slot == 1 : search for the slot. * is_slot == 0 : search for the node. */ static void * radix_tree_lookup_element(struct radix_tree_root *root, unsigned long index, int is_slot); Signed-off-by: Huang Shijie Cc: Nick Piggin Cc: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed