Re: [PATCH 4/6] edac: i82443bxgx_edac: use pci_get_device_by_id()
From: Robert Richter
Date: Thu Nov 28 2019 - 08:32:32 EST
On 28.11.19 13:54:04, Enrico Weigelt, metux IT consult wrote:
> Use the new pci_get_device_by_id() helper in order to reduce
> a bit of boilerplate.
> - while (mci_pdev == NULL && id->vendor != 0) {
> - mci_pdev = pci_get_device(id->vendor,
> - id->device, NULL);
> + while (mci_pdev == NULL && i82443bxgx_pci_tbl[i].vendor) {
> + mci_pdev = pci_get_device_by_id(
> + &i82443bxgx_pci_tbl[i]);
I don't see how this is less boilerplate. Since this differs from the
typical pattern for this it is less readable now.
-Robert