Messages in this thread | | | Subject | Re: [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE | From | Joe Perches <> | Date | Fri, 02 Dec 2011 13:01:48 -0800 |
| |
On Fri, 2011-12-02 at 08:03 -0800, Greg KH wrote: > On Fri, Dec 02, 2011 at 11:02:57AM +0800, Axel Lin wrote: > > Convert static struct pci_device_id *[] to static DEFINE_PCI_DEVICE_TABLE > > tables. Also convert to the PCI_DEVICE/PCI_VDEVICE macros for better > > readablity. [] > > diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c [] > > @@ -828,7 +828,7 @@ out: > > return error; > > } > > > > -static struct pci_device_id ilo_devices[] = { > > +static DEFINE_PCI_DEVICE_TABLE(ilo_devices) = { > > No, I hate this macro, see, it's actually taking you more characters to > use it than to just properly define the structure yourself. It's > pointless and stupid.
Not quite.
include/linux/pci.h:#define DEFINE_PCI_DEVICE_TABLE(_table) \ include/linux/pci.h- const struct pci_device_id _table[] __devinitconst
Using the macro does declare the struct const and use attribute __devinitconst to place the table into section .devinit.rodata.
The straight definition does not.
> So no, I'm not going to accept this patch, sorry.
Never in doubt, not always right...
cheers, Joe
| |