* [PATCH net-next v2 1/1] net: ks8851: use %*ph to print small buffer
@ 2024-10-16 13:25 Andy Shevchenko
2024-10-16 18:57 ` Simon Horman
2024-10-18 2:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2024-10-16 13:25 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Andy Shevchenko
Use %*ph format to print small buffer as hex string. It will change
the output format from 32-bit words to byte hexdump, but this is not
critical as it's only a debug message.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v2: wrapped on 80 (Simon), elaborated the format change (Simon)
drivers/net/ethernet/micrel/ks8851_common.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c
index 7fa1820db9cc..bb5138806c3f 100644
--- a/drivers/net/ethernet/micrel/ks8851_common.c
+++ b/drivers/net/ethernet/micrel/ks8851_common.c
@@ -215,22 +215,6 @@ static void ks8851_init_mac(struct ks8851_net *ks, struct device_node *np)
ks8851_write_mac_addr(dev);
}
-/**
- * ks8851_dbg_dumpkkt - dump initial packet contents to debug
- * @ks: The device state
- * @rxpkt: The data for the received packet
- *
- * Dump the initial data from the packet to dev_dbg().
- */
-static void ks8851_dbg_dumpkkt(struct ks8851_net *ks, u8 *rxpkt)
-{
- netdev_dbg(ks->netdev,
- "pkt %02x%02x%02x%02x %02x%02x%02x%02x %02x%02x%02x%02x\n",
- rxpkt[4], rxpkt[5], rxpkt[6], rxpkt[7],
- rxpkt[8], rxpkt[9], rxpkt[10], rxpkt[11],
- rxpkt[12], rxpkt[13], rxpkt[14], rxpkt[15]);
-}
-
/**
* ks8851_rx_pkts - receive packets from the host
* @ks: The device information.
@@ -296,8 +280,8 @@ static void ks8851_rx_pkts(struct ks8851_net *ks, struct sk_buff_head *rxq)
ks->rdfifo(ks, rxpkt, rxalign + 8);
- if (netif_msg_pktdata(ks))
- ks8851_dbg_dumpkkt(ks, rxpkt);
+ netif_dbg(ks, pktdata, ks->netdev,
+ "pkt %12ph\n", &rxpkt[4]);
skb->protocol = eth_type_trans(skb, ks->netdev);
__skb_queue_tail(rxq, skb);
--
2.43.0.rc1.1336.g36b5255a03ac
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2 1/1] net: ks8851: use %*ph to print small buffer
2024-10-16 13:25 [PATCH net-next v2 1/1] net: ks8851: use %*ph to print small buffer Andy Shevchenko
@ 2024-10-16 18:57 ` Simon Horman
2024-10-18 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-10-16 18:57 UTC (permalink / raw)
To: Andy Shevchenko
Cc: netdev, linux-kernel, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
On Wed, Oct 16, 2024 at 04:25:26PM +0300, Andy Shevchenko wrote:
> Use %*ph format to print small buffer as hex string. It will change
> the output format from 32-bit words to byte hexdump, but this is not
> critical as it's only a debug message.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: wrapped on 80 (Simon), elaborated the format change (Simon)
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next v2 1/1] net: ks8851: use %*ph to print small buffer
2024-10-16 13:25 [PATCH net-next v2 1/1] net: ks8851: use %*ph to print small buffer Andy Shevchenko
2024-10-16 18:57 ` Simon Horman
@ 2024-10-18 2:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-18 2:30 UTC (permalink / raw)
To: Andy Shevchenko
Cc: netdev, linux-kernel, andrew+netdev, davem, edumazet, kuba,
pabeni
Hello:
This patch was applied to netdev/net-next.git (main)
by Andrew Lunn <andrew@lunn.ch>:
On Wed, 16 Oct 2024 16:25:26 +0300 you wrote:
> Use %*ph format to print small buffer as hex string. It will change
> the output format from 32-bit words to byte hexdump, but this is not
> critical as it's only a debug message.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: wrapped on 80 (Simon), elaborated the format change (Simon)
> drivers/net/ethernet/micrel/ks8851_common.c | 20 ++------------------
> 1 file changed, 2 insertions(+), 18 deletions(-)
Here is the summary with links:
- [net-next,v2,1/1] net: ks8851: use %*ph to print small buffer
https://git.kernel.org/netdev/net-next/c/92cee559dbda
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:[~2024-10-18 2:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-16 13:25 [PATCH net-next v2 1/1] net: ks8851: use %*ph to print small buffer Andy Shevchenko
2024-10-16 18:57 ` Simon Horman
2024-10-18 2:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).