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


Groups > linux.kernel > #1647196

Re: [PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure

From Andy Shevchenko <andy.shevchenko@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure
Date 2017-05-22 19:10 +0200
Message-ID <tJZ0e-8sT-29@gated-at.bofh.it> (permalink)
References <tJTxw-50U-13@gated-at.bofh.it> <tJTxw-50U-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, May 22, 2017 at 2:12 PM, Jan Kiszka <jan.kiszka@siemens.com> 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

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


Thread

[PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure Jan Kiszka <jan.kiszka@siemens.com> - 2017-05-22 13:20 +0200
  Re: [PATCH 1/3] stmmac: pci: Overcome stmmac_pci_info structure Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-05-22 19:10 +0200

csiph-web