]> 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)
commit898a9372066b548d623ba11c0b5afbfea53471c7
treefad08c416c79de9a125a243bf2934fe5753df449
parent81d20a4aae24f8243f1fef94f27a5c2df8fbe115
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