net/lapb: tuse %*ph to dump buffers
Use %*ph specifier to dump small buffers in hex format instead doing this byte-by-byte. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Родитель
6756325a9a
Коммит
0d08df6c49
|
@ -444,10 +444,9 @@ static void lapb_state3_machine(struct lapb_cb *lapb, struct sk_buff *skb,
|
|||
break;
|
||||
|
||||
case LAPB_FRMR:
|
||||
lapb_dbg(1, "(%p) S3 RX FRMR(%d) %02X %02X %02X %02X %02X\n",
|
||||
lapb_dbg(1, "(%p) S3 RX FRMR(%d) %5ph\n",
|
||||
lapb->dev, frame->pf,
|
||||
skb->data[0], skb->data[1], skb->data[2],
|
||||
skb->data[3], skb->data[4]);
|
||||
skb->data);
|
||||
lapb_establish_data_link(lapb);
|
||||
lapb_dbg(0, "(%p) S3 -> S1\n", lapb->dev);
|
||||
lapb_requeue_frames(lapb);
|
||||
|
|
|
@ -148,9 +148,7 @@ void lapb_transmit_buffer(struct lapb_cb *lapb, struct sk_buff *skb, int type)
|
|||
}
|
||||
}
|
||||
|
||||
lapb_dbg(2, "(%p) S%d TX %02X %02X %02X\n",
|
||||
lapb->dev, lapb->state,
|
||||
skb->data[0], skb->data[1], skb->data[2]);
|
||||
lapb_dbg(2, "(%p) S%d TX %3ph\n", lapb->dev, lapb->state, skb->data);
|
||||
|
||||
if (!lapb_data_transmit(lapb, skb))
|
||||
kfree_skb(skb);
|
||||
|
|
|
@ -113,9 +113,7 @@ int lapb_decode(struct lapb_cb *lapb, struct sk_buff *skb,
|
|||
{
|
||||
frame->type = LAPB_ILLEGAL;
|
||||
|
||||
lapb_dbg(2, "(%p) S%d RX %02X %02X %02X\n",
|
||||
lapb->dev, lapb->state,
|
||||
skb->data[0], skb->data[1], skb->data[2]);
|
||||
lapb_dbg(2, "(%p) S%d RX %3ph\n", lapb->dev, lapb->state, skb->data);
|
||||
|
||||
/* We always need to look at 2 bytes, sometimes we need
|
||||
* to look at 3 and those cases are handled below.
|
||||
|
@ -284,10 +282,9 @@ void lapb_transmit_frmr(struct lapb_cb *lapb)
|
|||
dptr++;
|
||||
*dptr++ = lapb->frmr_type;
|
||||
|
||||
lapb_dbg(1, "(%p) S%d TX FRMR %02X %02X %02X %02X %02X\n",
|
||||
lapb_dbg(1, "(%p) S%d TX FRMR %5ph\n",
|
||||
lapb->dev, lapb->state,
|
||||
skb->data[1], skb->data[2], skb->data[3],
|
||||
skb->data[4], skb->data[5]);
|
||||
&skb->data[1]);
|
||||
} else {
|
||||
dptr = skb_put(skb, 4);
|
||||
*dptr++ = LAPB_FRMR;
|
||||
|
@ -299,9 +296,8 @@ void lapb_transmit_frmr(struct lapb_cb *lapb)
|
|||
dptr++;
|
||||
*dptr++ = lapb->frmr_type;
|
||||
|
||||
lapb_dbg(1, "(%p) S%d TX FRMR %02X %02X %02X\n",
|
||||
lapb->dev, lapb->state, skb->data[1],
|
||||
skb->data[2], skb->data[3]);
|
||||
lapb_dbg(1, "(%p) S%d TX FRMR %3ph\n",
|
||||
lapb->dev, lapb->state, &skb->data[1]);
|
||||
}
|
||||
|
||||
lapb_transmit_buffer(lapb, skb, LAPB_RESPONSE);
|
||||
|
|
Загрузка…
Ссылка в новой задаче