Re: [PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure
From: Andy Shevchenko <hidden>
Date: 2017-05-22 17:09:08
Also in:
lkml
From: Andy Shevchenko <hidden>
Date: 2017-05-22 17:09:08
Also in:
lkml
On Mon, May 22, 2017 at 2:12 PM, Jan Kiszka [off-list ref] wrote:
First, pass the PCI device reference as function parameter. Then the setup function knows which stmmac_pci_dmi_data structure to use. Finally, we are left with a setup function in stmmac_pci_info and can convert the structure into a function pointer. By converting stmmac_default_data to that type, we can make a setup function mandatory, and probing becomes more regular.
I don't see any good reason for this patch. Besides that it will not compile (as David noticed already). Can we modify structures with less intrusion? I'm pretty sure we can convert (if you wish, however I would leave it for now, there is no issue with current approach) with as twice less lines. -- With Best Regards, Andy Shevchenko