All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch/resubmit(2.5.50): Eliminate pci_dev.driver_data
@ 2002-11-30  1:42 Adam J. Richter
  2002-11-30  9:03 ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Adam J. Richter @ 2002-11-30  1:42 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, greg

[-- Attachment #1: Type: text/plain, Size: 1007 bytes --]

	This is the third time I'm posting this patch.  The only
comments anyone has made about it were from Greg Kroah-Hartmann, which
were in favor of integrating it.  Can we please get this integrated
already?  I want to try some more changes to pci.h and I'd rather keep
the patches separate.

	To review, this patch deletes pci_dev.driver_data, using the
existing pci_dev.device.driver_data field instead, thereby shrinking
struct pci_dev by four bytes on 32-bit machines.  The few device
drivers that attempted to directly reference pci_dev.driver_data were
fixed in a patch of mine that Jeff Garzik got into 2.5.45.  Also,
making this change should help with memory allocation improvements in
the future, although that's a separate issue.

-- 
Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

[-- Attachment #2: pci.diff --]
[-- Type: text/plain, Size: 1143 bytes --]

--- linux-2.5.50/include/linux/pci.h	2002-11-27 14:35:59.000000000 -0800
+++ linux/include/linux/pci.h	2002-11-23 06:41:41.000000000 -0800
@@ -344,7 +344,6 @@
 	u8		rom_base_reg;	/* which config register controls the ROM */
 
 	struct pci_driver *driver;	/* which driver has allocated this device */
-	void		*driver_data;	/* data private to the driver */
 	u64		dma_mask;	/* Mask of the bits of bus address this
 					   device implements.  Normally this is
 					   0xffffffff.  You only need to change
@@ -483,7 +482,7 @@
 	int  (*suspend) (struct pci_dev *dev, u32 state);	/* Device suspended */
 	int  (*resume) (struct pci_dev *dev);	                /* Device woken up */
 	int  (*enable_wake) (struct pci_dev *dev, u32 state, int enable);   /* Enable wake event */
-
+	unsigned int		alloc_regions : 1;
 	struct device_driver	driver;
 };
 
@@ -753,12 +752,12 @@
  */
 static inline void *pci_get_drvdata (struct pci_dev *pdev)
 {
-	return pdev->driver_data;
+	return pdev->dev.driver_data;
 }
 
 static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
 {
-	pdev->driver_data = data;
+	pdev->dev.driver_data = data;
 }
 
 /*

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

* Re: Patch/resubmit(2.5.50): Eliminate pci_dev.driver_data
@ 2002-11-30  1:45 Adam J. Richter
  0 siblings, 0 replies; 3+ messages in thread
From: Adam J. Richter @ 2002-11-30  1:45 UTC (permalink / raw)
  To: torvalds; +Cc: greg, linux-kernel


I wrote:
>Can we please get this integrated
>already?  I want to try some more changes to pci.h and I'd rather keep
>the patches separate.

	Grr.  I already have one overlapping patch that I forgot
to remove from that diff.  Here is a corrected patch.  It will
be offset by one line when you apply it.

Adam J. Richter     __     ______________   575 Oroville Road
adam@yggdrasil.com     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."

--- linux-2.5.50/include/linux/pci.h	2002-11-27 14:35:59.000000000 -0800
+++ linux/include/linux/pci.h	2002-11-23 06:41:41.000000000 -0800
@@ -344,8 +344,7 @@
 	u8		rom_base_reg;	/* which config register controls the ROM */
 
 	struct pci_driver *driver;	/* which driver has allocated this device */
-	void		*driver_data;	/* data private to the driver */
 	u64		dma_mask;	/* Mask of the bits of bus address this
 					   device implements.  Normally this is
 					   0xffffffff.  You only need to change
@@ -753,12 +752,12 @@
  */
 static inline void *pci_get_drvdata (struct pci_dev *pdev)
 {
-	return pdev->driver_data;
+	return pdev->dev.driver_data;
 }
 
 static inline void pci_set_drvdata (struct pci_dev *pdev, void *data)
 {
-	pdev->driver_data = data;
+	pdev->dev.driver_data = data;
 }
 
 /*

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

* Re: Patch/resubmit(2.5.50): Eliminate pci_dev.driver_data
  2002-11-30  1:42 Patch/resubmit(2.5.50): Eliminate pci_dev.driver_data Adam J. Richter
@ 2002-11-30  9:03 ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2002-11-30  9:03 UTC (permalink / raw)
  To: Adam J. Richter; +Cc: torvalds, linux-kernel

On Fri, Nov 29, 2002 at 05:42:41PM -0800, Adam J. Richter wrote:
> 	This is the third time I'm posting this patch.  The only
> comments anyone has made about it were from Greg Kroah-Hartmann, which
> were in favor of integrating it.  Can we please get this integrated
> already?  I want to try some more changes to pci.h and I'd rather keep
> the patches separate.

Sorry for the long delay, been working on other things...

I've finally added this to my trees, and will be sending it on to Linus.

thanks for your patience.

greg k-h

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

end of thread, other threads:[~2002-11-30  9:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-30  1:42 Patch/resubmit(2.5.50): Eliminate pci_dev.driver_data Adam J. Richter
2002-11-30  9:03 ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2002-11-30  1:45 Adam J. Richter

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.