Skip to contentSkip to conversation

EDAC mc numbers refactor 1-of-2

PATCH In review Doug Thompson 1 participant 1 message Jun 26, 2006 EDAC-core

lore
Share & tools
lore
#0 lore raw

PATCH 2/6 EDAC mc numbers refactor 1-of-2

From: Doug Thompson <[email protected]>

This is part 1 of a 2-part patch set. The code changes are split into two parts to make the patches more readable.

Remove add_mc_to_global_list().
In next patch, this function will be reimplemented with different semantics.

---
 edac_mc.c |   43 -------------------------------------------
 1 files changed, 43 deletions(-)
drivers/edac/edac_mc.c +0 -43
Index: linux-2.6.17-rc5/drivers/edac/edac_mc.c
===================================================================
@@ -1632,49 +1632,6 @@
 	return NULL;
 }
 
-static int add_mc_to_global_list(struct mem_ctl_info *mci)
-{
-	struct list_head *item, *insert_before;
-	struct mem_ctl_info *p;
-	int i;
-
-	if (list_empty(&mc_devices)) {
-		mci->mc_idx = 0;
-		insert_before = &mc_devices;
-	} else {
-		if (find_mci_by_dev(mci->dev)) {
-			edac_printk(KERN_WARNING, EDAC_MC,
-				"%s (%s) %s %s already assigned %d\n",
-				mci->dev->bus_id, dev_name(mci->dev),
-				mci->mod_name, mci->ctl_name,
-				mci->mc_idx);
-			return 1;
-		}
-
-		insert_before = NULL;
-		i = 0;
-
-		list_for_each(item, &mc_devices) {
-			p = list_entry(item, struct mem_ctl_info, link);
-
-			if (p->mc_idx != i) {
-				insert_before = item;
-				break;
-			}
-
-			i++;
-		}
-
-		mci->mc_idx = i;
-
-		if (insert_before == NULL)
-			insert_before = &mc_devices;
-	}
-
-	list_add_tail_rcu(&mci->link, insert_before);
-	return 0;
-}
-
 static void complete_mc_list_del(struct rcu_head *head)
 {
 	struct mem_ctl_info *mci;