public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Remove useless cruft from ATM HE driver.
@ 2004-01-23  6:35 davej
  2004-01-23  7:35 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: davej @ 2004-01-23  6:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, akpm

Echoing changes done in 2.4. (It now has a pci_pool_create backport).

diff -urpN --exclude-from=/home/davej/.exclude bk-linus/drivers/atm/he.c linux-2.5/drivers/atm/he.c
--- bk-linus/drivers/atm/he.c	2003-10-17 20:53:48.000000000 +0100
+++ linux-2.5/drivers/atm/he.c	2003-10-21 02:32:37.000000000 +0100
@@ -109,10 +109,6 @@ typedef void irqreturn_t;
 #define pci_get_drvdata(pci_dev)	(pci_dev)->driver_data
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,44)
-#define pci_pool_create(a, b, c, d, e)	pci_pool_create(a, b, c, d, e, SLAB_KERNEL)
-#endif
-
 #include "he.h"
 
 #include "suni.h"
@@ -785,7 +781,7 @@ he_init_group(struct he_dev *he_dev, int
 	/* small buffer pool */
 #ifdef USE_RBPS_POOL
 	he_dev->rbps_pool = pci_pool_create("rbps", he_dev->pci_dev,
-			CONFIG_RBPS_BUFSIZE, 8, 0);
+			CONFIG_RBPS_BUFSIZE, 8, 0, SLAB_KERNEL);
 	if (he_dev->rbps_pool == NULL) {
 		hprintk("unable to create rbps pages\n");
 		return -ENOMEM;
@@ -849,7 +845,7 @@ he_init_group(struct he_dev *he_dev, int
 	/* large buffer pool */
 #ifdef USE_RBPL_POOL
 	he_dev->rbpl_pool = pci_pool_create("rbpl", he_dev->pci_dev,
-			CONFIG_RBPL_BUFSIZE, 8, 0);
+			CONFIG_RBPL_BUFSIZE, 8, 0, SLAB_KERNEL);
 	if (he_dev->rbpl_pool == NULL) {
 		hprintk("unable to create rbpl pool\n");
 		return -ENOMEM;
@@ -1475,7 +1471,7 @@ he_start(struct atm_dev *dev)
 
 #ifdef USE_TPD_POOL
 	he_dev->tpd_pool = pci_pool_create("tpd", he_dev->pci_dev,
-		sizeof(struct he_tpd), TPD_ALIGNMENT, 0);
+		sizeof(struct he_tpd), TPD_ALIGNMENT, 0, SLAB_KERNEL);
 	if (he_dev->tpd_pool == NULL) {
 		hprintk("unable to create tpd pci_pool\n");
 		return -ENOMEM;         
@@ -1986,8 +1982,7 @@ he_service_tbrq(struct he_dev *he_dev, i
 			TBRQ_MULTIPLE(he_dev->tbrq_head) ? " MULTIPLE" : "");
 #ifdef USE_TPD_POOL
 		tpd = NULL;
-		p = &he_dev->outstanding_tpds;
-		while ((p = p->next) != &he_dev->outstanding_tpds) {
+		list_for_each(p, &he_dev->outstanding_tpds) {
 			struct he_tpd *__tpd = list_entry(p, struct he_tpd, entry);
 			if (TPD_ADDR(__tpd->status) == TBRQ_TPD(he_dev->tbrq_head)) {
 				tpd = __tpd;

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

* Re: Remove useless cruft from ATM HE driver.
  2004-01-23  6:35 Remove useless cruft from ATM HE driver davej
@ 2004-01-23  7:35 ` Andrew Morton
  2004-01-23  7:48   ` Dave Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2004-01-23  7:35 UTC (permalink / raw)
  To: davej; +Cc: linux-kernel, torvalds

davej@redhat.com wrote:
>
> Echoing changes done in 2.4. (It now has a pci_pool_create backport).

drivers/atm/he.c: In function `he_start':
drivers/atm/he.c:1474: too many arguments to function `pci_pool_create'

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

* Re: Remove useless cruft from ATM HE driver.
  2004-01-23  7:35 ` Andrew Morton
@ 2004-01-23  7:48   ` Dave Jones
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2004-01-23  7:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, torvalds

On Thu, Jan 22, 2004 at 11:35:10PM -0800, Andrew Morton wrote:
 > davej@redhat.com wrote:
 > >
 > > Echoing changes done in 2.4. (It now has a pci_pool_create backport).
 > 
 > drivers/atm/he.c: In function `he_start':
 > drivers/atm/he.c:1474: too many arguments to function `pci_pool_create'

Gah, pci_pool_create is already suitably neutered in 2.6 (only takes 5 args).
Kill all the hunks except the first.

	Dave


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

end of thread, other threads:[~2004-01-23  7:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-23  6:35 Remove useless cruft from ATM HE driver davej
2004-01-23  7:35 ` Andrew Morton
2004-01-23  7:48   ` Dave Jones

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