All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI Update for 2.6.3-rc1
Date: Mon, 9 Feb 2004 15:22:24 -0800	[thread overview]
Message-ID: <10763689443294@kroah.com> (raw)
In-Reply-To: <10763689433249@kroah.com>

ChangeSet 1.1607, 2004/02/09 14:05:33-08:00, greg@kroah.com

dmapool: fix up list_for_each() calls to list_for_each_entry()
  
Now this should get that Rusty^Wmonkey off my back...


 drivers/base/dmapool.c |   29 +++++++++++------------------
 1 files changed, 11 insertions(+), 18 deletions(-)


diff -Nru a/drivers/base/dmapool.c b/drivers/base/dmapool.c
--- a/drivers/base/dmapool.c	Mon Feb  9 14:58:07 2004
+++ b/drivers/base/dmapool.c	Mon Feb  9 14:58:07 2004
@@ -43,9 +43,11 @@
 static ssize_t
 show_pools (struct device *dev, char *buf)
 {
-	unsigned		temp, size;
-	char			*next;
-	struct list_head	*i, *j;
+	unsigned temp;
+	unsigned size;
+	char *next;
+	struct dma_page *page;
+	struct dma_pool *pool;
 
 	next = buf;
 	size = PAGE_SIZE;
@@ -55,16 +57,11 @@
 	next += temp;
 
 	down (&pools_lock);
-	list_for_each (i, &dev->dma_pools) {
-		struct dma_pool	*pool;
-		unsigned	pages = 0, blocks = 0;
+	list_for_each_entry(pool, &dev->dma_pools, pools) {
+		unsigned pages = 0;
+		unsigned blocks = 0;
 
-		pool = list_entry (i, struct dma_pool, pools);
-
-		list_for_each (j, &pool->page_list) {
-			struct dma_page	*page;
-
-			page = list_entry (j, struct dma_page, page_list);
+		list_for_each_entry(page, &pool->page_list, page_list) {
 			pages++;
 			blocks += page->in_use;
 		}
@@ -268,7 +265,6 @@
 dma_pool_alloc (struct dma_pool *pool, int mem_flags, dma_addr_t *handle)
 {
 	unsigned long		flags;
-	struct list_head	*entry;
 	struct dma_page		*page;
 	int			map, block;
 	size_t			offset;
@@ -276,9 +272,8 @@
 
 restart:
 	spin_lock_irqsave (&pool->lock, flags);
-	list_for_each (entry, &pool->page_list) {
+	list_for_each_entry(page, &pool->page_list, page_list) {
 		int		i;
-		page = list_entry (entry, struct dma_page, page_list);
 		/* only cachable accesses here ... */
 		for (map = 0, i = 0;
 				i < pool->blocks_per_page;
@@ -330,12 +325,10 @@
 pool_find_page (struct dma_pool *pool, dma_addr_t dma)
 {
 	unsigned long		flags;
-	struct list_head	*entry;
 	struct dma_page		*page;
 
 	spin_lock_irqsave (&pool->lock, flags);
-	list_for_each (entry, &pool->page_list) {
-		page = list_entry (entry, struct dma_page, page_list);
+	list_for_each_entry(page, &pool->page_list, page_list) {
 		if (dma < page->dma)
 			continue;
 		if (dma < (page->dma + pool->allocation))


  reply	other threads:[~2004-02-09 23:26 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-09 23:13 [BK PATCH] PCI update for 2.6.3-rc1 Greg KH
2004-02-09 23:22 ` [PATCH] PCI Update " Greg KH
2004-02-09 23:22   ` Greg KH
2004-02-09 23:22     ` Greg KH
2004-02-09 23:22       ` Greg KH
2004-02-09 23:22         ` Greg KH
2004-02-09 23:22           ` Greg KH
2004-02-09 23:22             ` Greg KH
2004-02-09 23:22               ` Greg KH
2004-02-09 23:22                 ` Greg KH
2004-02-09 23:22                   ` Greg KH
2004-02-09 23:22                     ` Greg KH
2004-02-09 23:22                       ` Greg KH
2004-02-09 23:22                         ` Greg KH
2004-02-09 23:22                           ` Greg KH
2004-02-09 23:22                             ` Greg KH
2004-02-09 23:22                               ` Greg KH
2004-02-09 23:22                                 ` Greg KH
2004-02-09 23:22                                   ` Greg KH
2004-02-09 23:22                                     ` Greg KH
2004-02-09 23:22                                       ` Greg KH
2004-02-09 23:22                                         ` Greg KH
2004-02-09 23:22                                           ` Greg KH
2004-02-09 23:22                                             ` Greg KH [this message]
2004-02-10 11:11                                               ` Marcelo Tosatti
2004-02-10 16:03     ` Geert Uytterhoeven
2004-02-10 16:46       ` Greg KH
2004-02-10 17:03         ` Kai Germaschewski
2004-02-10 17:49         ` Karsten Keil
2004-02-11 22:27           ` Adrian Bunk
2004-02-10 18:05         ` Adam Belay
2004-02-18 19:40           ` Greg KH

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=10763689443294@kroah.com \
    --to=greg@kroah.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.