mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ken Helias <kenhelias@web.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, Ken Helias <kenhelias@firemail.de>,
	linux-edac@vger.kernel.org
Subject: [PATCH 06/13] EDAC: Use list_add_(before|after) macros
Date: Fri,  6 Jun 2014 19:34:25 +0200	[thread overview]
Message-ID: <1402076072-4044-6-git-send-email-kenhelias@web.de> (raw)
In-Reply-To: <1402076072-4044-1-git-send-email-kenhelias@web.de>

From: Ken Helias <kenhelias@firemail.de>

Many places in the code uses list_add_tail/list_add to insert an entry
before/after another entry. This confuses the reader because these are usually
used to add an item to a list_head and not an entry. Better use the self
explaining function name.

Signed-off-by: Ken Helias <kenhelias@firemail.de>
Cc: linux-edac@vger.kernel.org
---
 drivers/edac/edac_device.c | 2 +-
 drivers/edac/edac_mc.c     | 2 +-
 drivers/edac/edac_pci.c    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/edac_device.c b/drivers/edac/edac_device.c
index 592af5f..b9216b2 100644
--- a/drivers/edac/edac_device.c
+++ b/drivers/edac/edac_device.c
@@ -318,7 +318,7 @@ static int add_edac_dev_to_global_list(struct edac_device_ctl_info *edac_dev)
 		}
 	}
 
-	list_add_tail_rcu(&edac_dev->link, insert_before);
+	list_add_before_rcu(&edac_dev->link, insert_before);
 	return 0;
 
 fail0:
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 2c694b5..ef4d653 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -653,7 +653,7 @@ static int add_mc_to_global_list(struct mem_ctl_info *mci)
 		}
 	}
 
-	list_add_tail_rcu(&mci->link, insert_before);
+	list_add_before_rcu(&mci->link, insert_before);
 	atomic_inc(&edac_handlers);
 	return 0;
 
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c
index 2cf44b4d..df6c69b 100644
--- a/drivers/edac/edac_pci.c
+++ b/drivers/edac/edac_pci.c
@@ -144,7 +144,7 @@ static int add_edac_pci_to_global_list(struct edac_pci_ctl_info *pci)
 		}
 	}
 
-	list_add_tail_rcu(&pci->link, insert_before);
+	list_add_before_rcu(&pci->link, insert_before);
 	return 0;
 
 fail0:
-- 
2.0.0


  parent reply	other threads:[~2014-06-06 17:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-06 17:34 [PATCHv2 01/13] list: Use argument hlist_add_after names from rcu variant Ken Helias
2014-06-06 17:34 ` [PATCHv2 02/13] list: Fix order of arguments for hlist_add_after(_rcu) Ken Helias
2014-06-06 17:34 ` [PATCH 03/13] list: Add list_add_(before|after) macros Ken Helias
2014-06-06 19:51   ` Hugh Dickins
2014-06-07 13:34     ` Christoph Hellwig
2014-06-06 17:34 ` [PATCH 04/13] metag: dma: Use " Ken Helias
2014-06-06 17:34 ` [PATCH 05/13] powerpc: " Ken Helias
2014-06-06 17:34 ` Ken Helias [this message]
2014-06-06 17:34 ` [PATCH 07/13] PCI: " Ken Helias
2014-06-06 17:34 ` [PATCH 08/13] mac80211: " Ken Helias
2014-06-06 17:34 ` [PATCH 09/13] jfs: " Ken Helias
2014-06-06 17:34 ` [PATCH 10/13] xhci: " Ken Helias
2014-06-06 17:34 ` [PATCH 11/13] iscsi-target: " Ken Helias
2014-06-06 17:34 ` [PATCH 12/13] s390: " Ken Helias
2014-06-06 17:34 ` [PATCH 13/13] staging: tidspbridge: " Ken Helias

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1402076072-4044-6-git-send-email-kenhelias@web.de \
    --to=kenhelias@web.de \
    --cc=akpm@linux-foundation.org \
    --cc=kenhelias@firemail.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®