mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/6]  EDAC mc numbers refactor 1-of-2
@ 2006-06-26 22:16 Doug Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Thompson @ 2006-06-26 22:16 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel

From: Doug Thompson <norsk5@xmission.com>

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.

Signed-off-by: Doug Thompson <norsk5@xmission.com>
---
 edac_mc.c |   43 -------------------------------------------
 1 files changed, 43 deletions(-)


Index: linux-2.6.17-rc5/drivers/edac/edac_mc.c
===================================================================
--- linux-2.6.17-rc5.orig/drivers/edac/edac_mc.c	2006-05-25 14:06:07.000000000 -0600
+++ linux-2.6.17-rc5/drivers/edac/edac_mc.c	2006-05-25 14:06:40.000000000 -0600
@@ -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;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/6]  EDAC mc numbers refactor 1-of-2
@ 2006-05-24 17:46 Doug Thompson
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Thompson @ 2006-05-24 17:46 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel


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.

Signed-of-by: Doug Thompson <norsk5@xmission.com>


Index: linux-2.6.17-rc3/drivers/edac/edac_mc.c
===================================================================
--- linux-2.6.17-rc3.orig/drivers/edac/edac_mc.c
+++ linux-2.6.17-rc3/drivers/edac/edac_mc.c
@@ -1390,49 +1390,6 @@ static struct mem_ctl_info *find_mci_by_
 	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;



"If you think Education is expensive, just try Ignorance"

"Don't tell people HOW to do things, tell them WHAT you
want and they will surprise you with their ingenuity."
                   Gen George Patton


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-06-26 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-26 22:16 [PATCH 2/6] EDAC mc numbers refactor 1-of-2 Doug Thompson
  -- strict thread matches above, loose matches on Subject: below --
2006-05-24 17:46 Doug Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®