From akpm@osdl.org Sun Dec  4 15:15:44 2005
Date: Sun, 04 Dec 2005 15:11:49 -0800
From: akpm@osdl.org
To: clameter@sgi.com, wfg@mail.ustc.edu.cn, mm-commits@vger.kernel.org
Subject: + radix-tree-remove-unnecessary-indirections-and-clean-up-code.patch added to -mm tree


The patch titled

     radix-tree: Remove unnecessary indirections and clean up code

has been added to the -mm tree.  Its filename is

     radix-tree-remove-unnecessary-indirections-and-clean-up-code.patch


From: Christoph Lameter <clameter@sgi.com>

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 lib/radix-tree.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diff -puN lib/radix-tree.c~radix-tree-remove-unnecessary-indirections-and-clean-up-code lib/radix-tree.c
--- devel/lib/radix-tree.c~radix-tree-remove-unnecessary-indirections-and-clean-up-code	2005-12-04 15:11:45.000000000 -0800
+++ devel-akpm/lib/radix-tree.c	2005-12-04 15:11:45.000000000 -0800
@@ -291,27 +291,25 @@ static inline void **__lookup_slot(struc
 				   unsigned long index)
 {
 	unsigned int height, shift;
-	struct radix_tree_node **slot;
+	struct radix_tree_node *slot;
 
 	height = root->height;
 	if (index > radix_tree_maxindex(height))
 		return NULL;
 
 	shift = (height-1) * RADIX_TREE_MAP_SHIFT;
-	slot = &root->rnode;
+	slot = root->rnode;
 
 	while (height > 0) {
-		if (*slot == NULL)
+		if (slot == NULL)
 			return NULL;
 
-		slot = (struct radix_tree_node **)
-			((*slot)->slots +
-				((index >> shift) & RADIX_TREE_MAP_MASK));
+		slot = slot->slots[(index >> shift) & RADIX_TREE_MAP_MASK];
 		shift -= RADIX_TREE_MAP_SHIFT;
 		height--;
 	}
 
-	return (void **)slot;
+	return slot;
 }
 
 /**
_

Patches currently in -mm which might be from clameter@sgi.com are

dequeue-a-huge-page-near-to-this-node.patch
add-numa-policy-support-for-huge-pages.patch
add-numa-policy-support-for-huge-pages-fix.patch
remove-old-node-based-policy-interface-from-mempolicyc.patch
hugepages-fold-find_or_alloc_pages-into-huge_no_page.patch
numa-policies-in-the-slab-allocator-v2.patch
preserve-irq-status-in-release_pages-__pagevec_lru_add.patch
swap-migration-v5-lru-operations.patch
swap-migration-v5-pf_swapwrite-to-allow-writing-to-swap.patch
swap-migration-v5-migrate_pages-function.patch
swap-migration-v5-migrate_pages-function-tweak.patch
swap-migration-v5-migrate_pages-function-do-not-free-the-page-in-swap_page.patch
swap-migration-add-config_migration-for-page-migration-support.patch
swap-migration-add-config_migration-for-page-migration-support-tweaks.patch
swap-migration-v5-mpol_mf_move-interface.patch
swap-migration-v5-sys_migrate_pages-interface.patch
swapmig-config_migration-fixes.patch
swapmig-add_to_swap-avoid-atomic-allocations.patch
swapmig-drop-unused-pages-immediately.patch
swapmig-extend-parameters-for-migrate_pages.patch
swapmig-switch-error-handling-in-migrate_pages-to-use-exx.patch
swapmig-switch-error-handling-in-migrate_pages-to-use-exx-fix.patch
swapmig-switch-error-handling-in-migrate_pages-to-use-exx-cleanup.patch
swapmig-switch-error-handling-in-migrate_pages-to-use-exx-cleanup-tidy.patch
mm-make-hugepages-obey-cpusets.patch
mempolicies-private-pointer-in-check_range-and-mpol_mf_invert.patch
fold-numa_maps-into-memopoliciesc.patch
mempolicies-unexport-get_vma_policy.patch
move-page-migration-related-functions-near-do_migrate_pages.patch
mm-optimize-numa-policy-handling-in-slab-allocator.patch
slab-remove-nested-ifdef-config_numa.patch
move-swiotlb-header-file-into-common-code-fix.patch
radix-tree-remove-unnecessary-indirections-and-clean-up-code.patch

