lkml.org 
[lkml]   [2019]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 4/6] edac: i82443bxgx_edac: use pci_get_device_by_id()
Date
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

\
 
 \ /
  Last update: 2019-11-28 14:32    [W:0.085 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site