mfd: ipaq-micro: Use %*ph for printing hexdump of a small buffer

The kernel already has a helper to print a hexdump of a small
buffer via pointer extension. Use that instead of open coded
variant.

In long term it helps to kill pr_cont() or at least narrow down
its use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230703140923.2840-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
Andy Shevchenko 2023-07-03 17:09:22 +03:00 committed by Lee Jones
parent 2ccfad1c2b
commit 8325ec08d6

View File

@ -131,10 +131,7 @@ static void micro_rx_msg(struct ipaq_micro *micro, u8 id, int len, u8 *data)
break;
default:
dev_err(micro->dev,
"unknown msg %d [%d] ", id, len);
for (i = 0; i < len; ++i)
pr_cont("0x%02x ", data[i]);
pr_cont("\n");
"unknown msg %d [%d] %*ph\n", id, len, len, data);
}
spin_unlock(&micro->lock);
}