Skip to content

Commit c130904

Browse files
mdrustadbjorn-helgaas
authored andcommitted
PCI: Use designated initialization in PCI_VDEVICE
By using designated initialization in PCI_VDEVICE, like other similar macros, many "missing initializer" warnings that appear when compiling with W=2 can be silenced. Tested-by: Phil Schmitt <[email protected]> Tested-by: Aaron Brown <[email protected]> Tested-by: Kavindya Deegala <[email protected]> Signed-off-by: Mark Rustad <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent 7ee4910 commit c130904

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

include/linux/pci.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -680,18 +680,18 @@ struct pci_driver {
680680

681681
/**
682682
* PCI_VDEVICE - macro used to describe a specific pci device in short form
683-
* @vendor: the vendor name
684-
* @device: the 16 bit PCI Device ID
683+
* @vend: the vendor name
684+
* @dev: the 16 bit PCI Device ID
685685
*
686686
* This macro is used to create a struct pci_device_id that matches a
687687
* specific PCI device. The subvendor, and subdevice fields will be set
688688
* to PCI_ANY_ID. The macro allows the next field to follow as the device
689689
* private data.
690690
*/
691691

692-
#define PCI_VDEVICE(vendor, device) \
693-
PCI_VENDOR_ID_##vendor, (device), \
694-
PCI_ANY_ID, PCI_ANY_ID, 0, 0
692+
#define PCI_VDEVICE(vend, dev) \
693+
.vendor = PCI_VENDOR_ID_##vend, .device = (dev), \
694+
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID, 0, 0
695695

696696
/* these external functions are only available when PCI support is enabled */
697697
#ifdef CONFIG_PCI

0 commit comments

Comments
 (0)