All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jiri Slaby <jirislaby@gmail.com>,
	Alex Dubov <oakad@yahoo.com>,
	David Altobelli <david.altobelli@hp.com>,
	Brent Casavant <bcasavan@sgi.com>,
	J Freyensee <james_p_freyensee@linux.intel.com>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE
Date: Fri, 2 Dec 2011 17:11:18 -0800	[thread overview]
Message-ID: <20111203011118.GA5234@kroah.com> (raw)
In-Reply-To: <CAF+7xWkO3j9eni_O2A-XbsQDPOQ23Xdc9meSMM3LA6Dac9DWWw@mail.gmail.com>

On Sat, Dec 03, 2011 at 09:04:45AM +0800, Axel Lin wrote:
> 2011/12/3 Greg KH <greg@kroah.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@arndb.de>
> >> Cc: Greg Kroah-Hartman <greg@kroah.com>
> >> Cc: David Altobelli <david.altobelli@hp.com>
> >> Cc: Brent Casavant <bcasavan@sgi.com>
> >> Cc: Jiri Slaby <jirislaby@gmail.com>
> >> Cc: J Freyensee <james_p_freyensee@linux.intel.com>
> >> Cc: Alex Dubov <oakad@yahoo.com>
> >> Signed-off-by: Axel Lin <axel.lin@gmail.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.

I still don't like it, sorry.

greg "stick in the mud" k-h

      reply	other threads:[~2011-12-03  1:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-02  3:02 [PATCH] MISC: Convert to DEFINE_PCI_DEVICE_TABLE Axel Lin
2011-12-02 15:42 ` Brent Casavant
2011-12-02 15:50 ` Altobelli, David
2011-12-02 16:03 ` Greg KH
2011-12-02 21:01   ` Joe Perches
2011-12-03  1:04   ` Axel Lin
2011-12-03  1:11     ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111203011118.GA5234@kroah.com \
    --to=greg@kroah.com \
    --cc=arnd@arndb.de \
    --cc=axel.lin@gmail.com \
    --cc=bcasavan@sgi.com \
    --cc=david.altobelli@hp.com \
    --cc=james_p_freyensee@linux.intel.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.