]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] radix-tree: Remove unnecessary indirections and clean up code
authorChristoph Lameter <clameter@engr.sgi.com>
Tue, 6 Sep 2005 22:16:46 +0000 (15:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 7 Sep 2005 23:57:21 +0000 (16:57 -0700)
commit201b6264ff3865090747f58f48e087c3a35e0dbc
tree0633a10394d402779465c821d9de57a5e3df2a4b
parent987132bb0b136c93cef5f195e7371bb98df64709
[PATCH] radix-tree: Remove unnecessary indirections and clean up code

- There is frequent use of indirections in the radix code. This patch
  removes those indirections, makes the code more readable and allows
  the compilers to generate better code.

- Removing indirections allows the removal of several casts.

- Removing indirections allows the reduction of the radix_tree_path
  size from 3 to 2 words.

- Use pathp-> consistently.

- Remove unnecessary tmp variable in radix_tree_insert

- Separate the upper layer processing from the lowest layer in __lookup()
  in order to make it easier to understand what is going on and allow
  compilers to generate better code for the loop.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
lib/radix-tree.c