From: Ken Helias Subject: [PATCH 04/13] metag: dma: Use list_add_(before|after) macros Date: Fri, 6 Jun 2014 19:34:23 +0200 Message-ID: <1402076072-4044-4-git-send-email-kenhelias@web.de> References: <1402076072-4044-1-git-send-email-kenhelias@web.de> Return-path: In-Reply-To: <1402076072-4044-1-git-send-email-kenhelias@web.de> Sender: linux-kernel-owner@vger.kernel.org List-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Ken Helias , linux-metag@vger.kernel.org From: Ken Helias 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 Cc: linux-metag@vger.kernel.org --- arch/metag/kernel/dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/metag/kernel/dma.c b/arch/metag/kernel/dma.c index c700d62..8b384d8 100644 --- a/arch/metag/kernel/dma.c +++ b/arch/metag/kernel/dma.c @@ -138,7 +138,7 @@ found: /* * Insert this entry _before_ the one we found. */ - list_add_tail(&new->vm_list, &c->vm_list); + list_add_before(&new->vm_list, &c->vm_list); new->vm_start = addr; new->vm_end = addr + size; new->vm_active = 1; -- 2.0.0