Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651870

Re: [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices

From Andy Shevchenko <andy.shevchenko@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices
Date 2017-05-27 15:20 +0200
Message-ID <tLJNn-4w4-3@gated-at.bofh.it> (permalink)
References <tLpYn-83M-43@gated-at.bofh.it> <tLpYn-83M-53@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, May 26, 2017 at 7:07 PM, Jan Kiszka <jan.kiszka@siemens.com> wrote:
> Make stmmac_default_data compatible with stmmac_pci_info.setup and use
> an info structure for all devices. This allows to make the probing more
> regular.


> +#define STMMAC_DEVICE(vendor_id, dev_id, info) {       \
> +       PCI_DEVICE(vendor_id, dev_id),                  \

Perhaps

#define STMMAC_DEVICE(_vid, _did, info) {       \
       PCI_DEVICE(PCI_VENDOR_ID_##_vid, _did),                  \

Or converting defines first to PCI_DEVICE_ID_*
and

#define STMMAC_DEVICE(_vid, _did, info) {       \
       PCI_DEVICE(PCI_VENDOR_ID_##_vid, PCI_DEVICE_ID_##_did),
         \

which I like even better.

> +       .driver_data = (kernel_ulong_t)&info            \
> +       }
> +
>  static const struct pci_device_id stmmac_id_table[] = {
> -       {PCI_DEVICE(STMMAC_VENDOR_ID, STMMAC_DEVICE_ID)},
> -       {PCI_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_MAC)},
> -       {PCI_VDEVICE(INTEL, STMMAC_QUARK_ID), (kernel_ulong_t)&quark_pci_info},
> +       STMMAC_DEVICE(STMMAC_VENDOR_ID, STMMAC_DEVICE_ID, stmmac_pci_info),
> +       STMMAC_DEVICE(PCI_VENDOR_ID_STMICRO, PCI_DEVICE_ID_STMICRO_MAC,
> +                     stmmac_pci_info),
> +       STMMAC_DEVICE(PCI_VENDOR_ID_INTEL, STMMAC_QUARK_ID, quark_pci_info),

-- 
With Best Regards,
Andy Shevchenko

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] stmmac: pci: Refactor DMI probing Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-26 18:10 +0200
  [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-26 18:10 +0200
    Re: [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 15:20 +0200
      Re: [PATCH v2 2/6] stmmac: pci: Use stmmac_pci_info for all devices Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 15:20 +0200
  [PATCH v2 5/6] stmmac: pci: Use dmi_system_id table for retrieving PHY addresses Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-26 18:10 +0200
    Re: [PATCH v2 5/6] stmmac: pci: Use dmi_system_id table for  retrieving PHY addresses Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 15:30 +0200
      Re: [PATCH v2 5/6] stmmac: pci: Use dmi_system_id table for  retrieving PHY addresses Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-28 19:00 +0200
  [PATCH v2 1/6] stmmac: pci: Make stmmac_pci_info structure constant Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-26 18:20 +0200
  [PATCH v2 6/6] stmmac: pci: Remove setup handler indirection via stmmac_pci_info Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-26 18:20 +0200
    Re: [PATCH v2 6/6] stmmac: pci: Remove setup handler indirection via stmmac_pci_info Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-27 15:40 +0200
      Re: [PATCH v2 6/6] stmmac: pci: Remove setup handler indirection via  stmmac_pci_info Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-28 19:00 +0200

csiph-web