lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1322859708.17683.17.camel@joe2Laptop>
Date:	Fri, 02 Dec 2011 13:01:48 -0800
From:	Joe Perches <joe@...ches.com>
To:	Greg KH <greg@...ah.com>
Cc:	Axel Lin <axel.lin@...il.com>, 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

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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ