Skip to content

Commit

Permalink
platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a smal…
Browse files Browse the repository at this point in the history
…l 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/20230612212336.4961-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
  • Loading branch information
Andy Shevchenko authored and Tzung-Bi Shih committed Jun 13, 2023
1 parent f5bb4e3 commit 2b8cc58
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/platform/chrome/cros_ec_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,7 @@ static void debug_packet(struct device *dev, const char *name, u8 *ptr,
int len)
{
#ifdef DEBUG
int i;

dev_dbg(dev, "%s: ", name);
for (i = 0; i < len; i++)
pr_cont(" %02x", ptr[i]);

pr_cont("\n");
dev_dbg(dev, "%s: %*ph\n", name, len, ptr);
#endif
}

Expand Down

0 comments on commit 2b8cc58

Please sign in to comment.