ipmi: use %*ph to print small buffer
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Fri, 11 Oct 2019 15:50:36 +0000 (18:50 +0300)
committerCorey Minyard <cminyard@mvista.com>
Tue, 22 Oct 2019 19:42:34 +0000 (14:42 -0500)
commit8ee7b485bbfbd182aa2c1a0a45812e151c1000bd
tree9b839e68e7172d2aabfd7534b1ddf76ea8cc0fc9
parentcbb79863fc3175ed5ac506465948b02a893a8235
ipmi: use %*ph to print small buffer

Use %*ph format to print small buffer as hex string.

The change is safe since the specifier can handle up to 64 bytes and taking
into account the buffer size of 100 bytes on stack the function has never been
used to dump more than 32 bytes. Note, this also avoids potential buffer
overflow if the length of the input buffer is bigger.

This completely eliminates ipmi_debug_msg() in favour of Dynamic Debug.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Message-Id: <20191011155036.36748-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/ipmi_msghandler.c