sfc: Search VPD with pci_vpd_find_ro_info_keyword()
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 18 Aug 2021 19:03:44 +0000 (21:03 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 20 Aug 2021 20:49:00 +0000 (15:49 -0500)
commit37838aa437c78fefd7d818f5f01a3a3950e92f40
tree947723f1c76760d0b6371da52b7a470f6fca05b3
parent5119e20facfaa9f5454dd01192f3729415c7b139
sfc: 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.

Link: https://lore.kernel.org/r/bf5d4ba9-61a9-2bfe-19ec-75472732d74d@gmail.com
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/net/ethernet/sfc/efx.c