public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer
@ 2023-06-12 21:23 Andy Shevchenko
  2023-06-13  4:30 ` patchwork-bot+chrome-platform
  2023-06-14  5:10 ` patchwork-bot+chrome-platform
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2023-06-12 21:23 UTC (permalink / raw)
  To: Andy Shevchenko, chrome-platform, linux-kernel
  Cc: Benson Leung, Guenter Roeck

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>
---
 drivers/platform/chrome/cros_ec_spi.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/platform/chrome/cros_ec_spi.c b/drivers/platform/chrome/cros_ec_spi.c
index 21143dba8970..3e88cc92e819 100644
--- a/drivers/platform/chrome/cros_ec_spi.c
+++ b/drivers/platform/chrome/cros_ec_spi.c
@@ -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
 }
 
-- 
2.40.0.1.gaa8946217a0b


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer
  2023-06-12 21:23 [PATCH v1 1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer Andy Shevchenko
@ 2023-06-13  4:30 ` patchwork-bot+chrome-platform
  2023-06-14  5:10 ` patchwork-bot+chrome-platform
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-06-13  4:30 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: chrome-platform, linux-kernel, bleung, groeck

Hello:

This patch was applied to chrome-platform/linux.git (for-kernelci)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue, 13 Jun 2023 00:23:36 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v1,1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer
    https://git.kernel.org/chrome-platform/c/2b8cc5858a07

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1 1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer
  2023-06-12 21:23 [PATCH v1 1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer Andy Shevchenko
  2023-06-13  4:30 ` patchwork-bot+chrome-platform
@ 2023-06-14  5:10 ` patchwork-bot+chrome-platform
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+chrome-platform @ 2023-06-14  5:10 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: chrome-platform, linux-kernel, bleung, groeck

Hello:

This patch was applied to chrome-platform/linux.git (for-next)
by Tzung-Bi Shih <tzungbi@kernel.org>:

On Tue, 13 Jun 2023 00:23:36 +0300 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [v1,1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer
    https://git.kernel.org/chrome-platform/c/2b8cc5858a07

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-14  5:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-12 21:23 [PATCH v1 1/1] platform/chrome: cros_ec_spi: Use %*ph for printing hexdump of a small buffer Andy Shevchenko
2023-06-13  4:30 ` patchwork-bot+chrome-platform
2023-06-14  5:10 ` patchwork-bot+chrome-platform

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox