[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF+7xWkO3j9eni_O2A-XbsQDPOQ23Xdc9meSMM3LA6Dac9DWWw@mail.gmail.com>
Date: Sat, 3 Dec 2011 09:04:45 +0800
From: Axel Lin <axel.lin@...il.com>
To: Greg KH <greg@...ah.com>
Cc: linux-kernel@...r.kernel.org, Jiri Slaby <jirislaby@...il.com>,
Alex Dubov <oakad@...oo.com>,
David Altobelli <david.altobelli@...com>,
Brent Casavant <bcasavan@....com>,
J Freyensee <james_p_freyensee@...ux.intel.com>,
Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE
2011/12/3 Greg KH <greg@...ah.com>:
> 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.
>>
>> Cc: Arnd Bergmann <arnd@...db.de>
>> Cc: Greg Kroah-Hartman <greg@...ah.com>
>> Cc: David Altobelli <david.altobelli@...com>
>> Cc: Brent Casavant <bcasavan@....com>
>> Cc: Jiri Slaby <jirislaby@...il.com>
>> Cc: J Freyensee <james_p_freyensee@...ux.intel.com>
>> Cc: Alex Dubov <oakad@...oo.com>
>> Signed-off-by: Axel Lin <axel.lin@...il.com>
>> ---
>> drivers/misc/hpilo.c | 2 +-
>> drivers/misc/ioc4.c | 6 +++---
>> drivers/misc/pch_phub.c | 2 +-
>> drivers/misc/phantom.c | 2 +-
>> drivers/misc/pti.c | 2 +-
>> drivers/misc/tifm_7xx1.c | 11 ++++-------
>> 6 files changed, 11 insertions(+), 14 deletions(-)
>>
>> diff --git a/drivers/misc/hpilo.c b/drivers/misc/hpilo.c
>> index fffc227..f705cbb 100644
>> --- 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.
>
$ grep -r "^static .*pci_device_id" drivers/misc/*
drivers/misc/cb710/core.c:static const struct pci_device_id cb710_pci_tbl[] = {
drivers/misc/hpilo.c:static struct pci_device_id ilo_devices[] = {
drivers/misc/ibmasm/module.c:static int __devinit
ibmasm_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
drivers/misc/ibmasm/module.c:static struct pci_device_id ibmasm_pci_table[] =
drivers/misc/ioc4.c:static struct pci_device_id ioc4_id_table[] = {
drivers/misc/pch_phub.c:static struct pci_device_id pch_phub_pcidev_id[] = {
drivers/misc/phantom.c:static struct pci_device_id phantom_pci_tbl[]
__devinitdata = {
drivers/misc/pti.c:static struct pci_device_id pci_ids[] __devinitconst = {
drivers/misc/tifm_7xx1.c:static struct pci_device_id tifm_7xx1_pci_tbl [] = {
Some drivers missed const and __devinitconst annotations, it would be
easier to use
DEFINE_PCI_DEVICE_TABLE.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists