]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: qedf: Use pci_get_dsn()
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 3 Mar 2020 02:25:02 +0000 (18:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Mar 2020 01:36:24 +0000 (17:36 -0800)
commitc2d0c437e7eb8ffba0d010699e1486a85d2d4621
treefad08c416c79de9a125a243bf2934fe5753df449
parent67e07e171266fcd009f0d141d07434172cc6fba8
scsi: qedf: Use pci_get_dsn()

Replace the open-coded implementation for reading the PCIe DSN with
pci_get_dsn().

The original code used a for-loop that looped over each of the 8 bytes
and copied them into a temporary buffer. pci_get_dsn() uses two calls to
pci_read_config_dword, and correctly bitwise ORs them into a u64. Thus,
we can simplify the snprintf significantly using %016llX on a u64 value.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/scsi/qedf/qedf_main.c