sfc: falcon: Search VPD with pci_vpd_find_ro_info_keyword()
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 22 Aug 2021 13:49:36 +0000 (15:49 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 24 Aug 2021 16:41:58 +0000 (11:41 -0500)
commit2d57dd6673a87ea23d8660257162d6280fe7b2e6
tree17bdd3533a2108636896861ce86d41c7d737ef63
parent667bb0e8f7106c6ca3b30254a7fdcd1ea04d3580
sfc: falcon: Search VPD with pci_vpd_find_ro_info_keyword()

Use pci_vpd_find_ro_info_keyword() to search for keywords in VPD to
simplify the code.

Replace netif_err() with pci_err() because the netdevice isn't registered
yet, which results in very ugly messages.

Use kmemdup_nul() instead of open-coding it.

This is the same as 37838aa437c7 ("sfc: Search VPD with
pci_vpd_find_ro_info_keyword()"), just for the falcon chip version.

Link: https://lore.kernel.org/r/898282a1-13bd-17bc-2e9a-d3dcd336b46c@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/net/ethernet/sfc/falcon/efx.c