IB/srp: Use print_hex_dump()
Replace an open-coded dump of the receive buffer with a call to print_hex_dump(). Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
committed by
Roland Dreier
parent
589643be66
commit
7a7008110b
@@ -879,21 +879,10 @@ static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc)
|
|||||||
opcode = *(u8 *) iu->buf;
|
opcode = *(u8 *) iu->buf;
|
||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
int i;
|
|
||||||
|
|
||||||
shost_printk(KERN_ERR, target->scsi_host,
|
shost_printk(KERN_ERR, target->scsi_host,
|
||||||
PFX "recv completion, opcode 0x%02x\n", opcode);
|
PFX "recv completion, opcode 0x%02x\n", opcode);
|
||||||
|
print_hex_dump(KERN_ERR, "", DUMP_PREFIX_OFFSET, 8, 1,
|
||||||
for (i = 0; i < wc->byte_len; ++i) {
|
iu->buf, wc->byte_len, true);
|
||||||
if (i % 8 == 0)
|
|
||||||
printk(KERN_ERR " [%02x] ", i);
|
|
||||||
printk(" %02x", ((u8 *) iu->buf)[i]);
|
|
||||||
if ((i + 1) % 8 == 0)
|
|
||||||
printk("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wc->byte_len % 8)
|
|
||||||
printk("\n");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (opcode) {
|
switch (opcode) {
|
||||||
|
Reference in New Issue
Block a user