Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1533619 > unrolled thread
| Started by | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| First post | 2016-11-30 23:10 +0100 |
| Last post | 2016-12-02 18:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] net: atarilance: use %8ph for printing hex string Rasmus Villemoes <linux@rasmusvillemoes.dk> - 2016-11-30 23:10 +0100
Re: [PATCH] net: atarilance: use %8ph for printing hex string David Miller <davem@davemloft.net> - 2016-12-02 18:10 +0100
| From | Rasmus Villemoes <linux@rasmusvillemoes.dk> |
|---|---|
| Date | 2016-11-30 23:10 +0100 |
| Subject | [PATCH] net: atarilance: use %8ph for printing hex string |
| Message-ID | <sJleG-3nG-11@gated-at.bofh.it> |
This is already using the %pM printf extension; might as well also use %ph to make the code smaller. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> --- drivers/net/ethernet/amd/atarilance.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c index d2bc8e5dcd23..d208a0532811 100644 --- a/drivers/net/ethernet/amd/atarilance.c +++ b/drivers/net/ethernet/amd/atarilance.c @@ -1013,13 +1013,9 @@ static int lance_rx( struct net_device *dev ) u_char *data = PKTBUF_ADDR(head); printk(KERN_DEBUG "%s: RX pkt type 0x%04x from %pM to %pM " - "data %02x %02x %02x %02x %02x %02x %02x %02x " - "len %d\n", + "data %8ph len %d\n", dev->name, ((u_short *)data)[6], - &data[6], data, - data[15], data[16], data[17], data[18], - data[19], data[20], data[21], data[22], - pkt_len); + &data[6], data, &data[15], pkt_len); } skb_reserve( skb, 2 ); /* 16 byte align */ -- 2.1.4
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-12-02 18:10 +0100 |
| Message-ID | <sJZvs-6Fu-23@gated-at.bofh.it> |
| In reply to | #1533619 |
From: Rasmus Villemoes <linux@rasmusvillemoes.dk> Date: Wed, 30 Nov 2016 23:02:54 +0100 > This is already using the %pM printf extension; might as well also use > %ph to make the code smaller. > > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Applied, thank you.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web