• Christoph Lameter's avatar
    [PATCH] radix-tree: Remove unnecessary indirections and clean up code · 201b6264
    Christoph Lameter authored
    - 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: default avatarChristoph Lameter <clameter@sgi.com>
    Cc: Nick Piggin <nickpiggin@yahoo.com.au>
    Cc: James Bottomley <James.Bottomley@steeleye.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    201b6264
radix-tree.c 19.3 KB