lkml.org 
[lkml]   [2011]   [Dec]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE
From
Date
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



\
 
 \ /
  Last update: 2011-12-02 22:05    [W:0.918 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site