public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] rtw88: use %*ph to print small buffer
@ 2022-06-03 12:56 Andy Shevchenko
  2022-06-06  6:45 ` Ping-Ke Shih
  2022-06-08  8:07 ` [v1,1/1] wifi: " Kalle Valo
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-06-03 12:56 UTC (permalink / raw)
  To: Ping-Ke Shih, Kalle Valo, linux-wireless, netdev, linux-kernel
  Cc: Yan-Hsuan Chuang, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Andy Shevchenko

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

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/net/wireless/realtek/rtw88/debug.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
index 1a52ff585fbc..7cde6bcf253b 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.c
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
@@ -269,11 +269,7 @@ static int rtw_debugfs_get_rsvd_page(struct seq_file *m, void *v)
 	for (i = 0 ; i < buf_size ; i += 8) {
 		if (i % page_size == 0)
 			seq_printf(m, "PAGE %d\n", (i + offset) / page_size);
-		seq_printf(m, "%2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x %2.2x\n",
-			   *(buf + i), *(buf + i + 1),
-			   *(buf + i + 2), *(buf + i + 3),
-			   *(buf + i + 4), *(buf + i + 5),
-			   *(buf + i + 6), *(buf + i + 7));
+		seq_printf(m, "%8ph\n", buf + i);
 	}
 	vfree(buf);
 
-- 
2.35.1


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

end of thread, other threads:[~2022-06-08  8:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-03 12:56 [PATCH v1 1/1] rtw88: use %*ph to print small buffer Andy Shevchenko
2022-06-06  6:45 ` Ping-Ke Shih
2022-06-08  8:07 ` [v1,1/1] wifi: " Kalle Valo

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