On Fri, Jul 27, 2018 at 11:49:44PM +0300, Andy Shevchenko wrote:
> There are a lot of examples in the kernel where PCI_VDEVICE() is used and 
> still
> looks not so convenient due to additional driver_data field attached.
> 
> Introduce PCI_DEVICE_DATA() macro to fully describe device ID entry in 
> shortest
> possible form. For example,
> 
>   before:
> 
>     { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_MRFLD),
>       (kernel_ulong_t) &dwc3_pci_mrfld_properties, },
> 
>   after:
> 
>     { PCI_DEVICE_DATA(INTEL, INTEL_MRFLD, &dwc3_pci_mrfld_properties) },

Most device IDs include the vendor ID; did you consider pasting the
vendor ID string into the device ID, so you would end up with this?

    { PCI_DEVICE_DATA(INTEL, MRFLD, &dwc3_pci_mrfld_properties) },

I don't absolutely love either PCI_VDEVICE or PCI_DEVICE_DATA because
grep doesn't work as well to find uses of the symbol, but the existing
2300 uses of PCI_VDEVICE are telling me pretty loudly to just get over
it :)

Bjorn

Reply via email to