Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: ks8851: use %*ph to print small buffer

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>
Reviewed-by: Simon Horman <horms@kernel.org>
Message-ID: <20241016132615.899037-1-andriy.shevchenko@linux.intel.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>

authored by

Andy Shevchenko and committed by
Andrew Lunn
92cee559 4b726103

+2 -18
+2 -18
drivers/net/ethernet/micrel/ks8851_common.c
··· 216 216 } 217 217 218 218 /** 219 - * ks8851_dbg_dumpkkt - dump initial packet contents to debug 220 - * @ks: The device state 221 - * @rxpkt: The data for the received packet 222 - * 223 - * Dump the initial data from the packet to dev_dbg(). 224 - */ 225 - static void ks8851_dbg_dumpkkt(struct ks8851_net *ks, u8 *rxpkt) 226 - { 227 - netdev_dbg(ks->netdev, 228 - "pkt %02x%02x%02x%02x %02x%02x%02x%02x %02x%02x%02x%02x\n", 229 - rxpkt[4], rxpkt[5], rxpkt[6], rxpkt[7], 230 - rxpkt[8], rxpkt[9], rxpkt[10], rxpkt[11], 231 - rxpkt[12], rxpkt[13], rxpkt[14], rxpkt[15]); 232 - } 233 - 234 - /** 235 219 * ks8851_rx_pkts - receive packets from the host 236 220 * @ks: The device information. 237 221 * @rxq: Queue of packets received in this function. ··· 280 296 281 297 ks->rdfifo(ks, rxpkt, rxalign + 8); 282 298 283 - if (netif_msg_pktdata(ks)) 284 - ks8851_dbg_dumpkkt(ks, rxpkt); 299 + netif_dbg(ks, pktdata, ks->netdev, 300 + "pkt %12ph\n", &rxpkt[4]); 285 301 286 302 skb->protocol = eth_type_trans(skb, ks->netdev); 287 303 __skb_queue_tail(rxq, skb);