[Intel-wired-lan] [PATCH v1] ice: devlink: use %*phD to print small buffer

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Jul 31 07:49:08 UTC 2020


On Thu, Jul 30, 2020 at 02:20:46PM -0700, Jacob Keller wrote:
> On 7/30/2020 9:04 AM, Andy Shevchenko wrote:
> > Use %*phD format to print small buffer as hex string.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
> 
> Ah nice. I swear I looked for a printk format to do this and didn't find
> one. But it's been there since 2012.. so I guess I just missed it.

commit 31550a16a5d2af859e8a11839e8c6c6c9c92dfa7
Author: Andy Shevchenko <andriy.shevchenko at linux.intel.com>
Date:   Mon Jul 30 14:40:27 2012 -0700

    vsprintf: add support of '%*ph[CDN]'

Maybe it was just a coincidence :-)

> Reviewed-by: Jacob Keller <jacob.e.keller at intel.com>
> 
> I also tested this on my system to make sure it gives the same output
> for the serial value, so I guess also:
> 
> Tested-by: Jacob Keller <jacob.e.keller at intel.com>

Thanks!

-- 
With Best Regards,
Andy Shevchenko




More information about the Intel-wired-lan mailing list