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)
commitdbce64cbee6b983890f17b91984dfdf7bd458e19
treefad08c416c79de9a125a243bf2934fe5753df449
parent8d85b75b4e08ab41e55dbb43cb1b82b5b35f22c5
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