diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-10-07 20:54:40 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-10-09 23:14:19 +0300 |
commit | 4d7ebed6aa17fb253bf44b12e38169fd4dc3e057 (patch) | |
tree | 5c3ec264f28136b17733f04997f87cf3d459b239 /drivers/net/ethernet | |
parent | 5d3b8ec99a3cee8f6abe13f74f2f55f58d67726a (diff) | |
download | linux-4d7ebed6aa17fb253bf44b12e38169fd4dc3e057.tar.xz |
ice: devlink: use %*phD to print small buffer
Use %*phD format to print small buffer as hex string.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_devlink.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_devlink.c b/drivers/net/ethernet/intel/ice/ice_devlink.c index e17b44059eae..29b88643b99a 100644 --- a/drivers/net/ethernet/intel/ice/ice_devlink.c +++ b/drivers/net/ethernet/intel/ice/ice_devlink.c @@ -13,9 +13,7 @@ static int ice_info_get_dsn(struct ice_pf *pf, char *buf, size_t len) /* Copy the DSN into an array in Big Endian format */ put_unaligned_be64(pci_get_dsn(pf->pdev), dsn); - snprintf(buf, len, "%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x", - dsn[0], dsn[1], dsn[2], dsn[3], - dsn[4], dsn[5], dsn[6], dsn[7]); + snprintf(buf, len, "%8phD", dsn); return 0; } |