Commit 23456565 authored by Joe Perches's avatar Joe Perches Committed by Martin K. Petersen

scsi: qla2xxx: Fix ql_dump_buffer

Recent printk changes for KERN_CONT cause this logging to be defectively
emitted on multiple lines.  Fix it.

Also reduces object size a trivial amount.

$ size drivers/scsi/qla2xxx/qla_dbg.o*
   text	   data	    bss	    dec	    hex	filename
  39125	      0	      0	  39125	   98d5	drivers/scsi/qla2xxx/qla_dbg.o.new
  39164	      0	      0	  39164	   98fc	drivers/scsi/qla2xxx/qla_dbg.o.old
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarHimanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 934767c5
...@@ -2707,13 +2707,9 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id, ...@@ -2707,13 +2707,9 @@ ql_dump_buffer(uint32_t level, scsi_qla_host_t *vha, int32_t id,
"%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size); "%-+5d 0 1 2 3 4 5 6 7 8 9 A B C D E F\n", size);
ql_dbg(level, vha, id, ql_dbg(level, vha, id,
"----- -----------------------------------------------\n"); "----- -----------------------------------------------\n");
for (cnt = 0; cnt < size; cnt++, buf++) { for (cnt = 0; cnt < size; cnt += 16) {
if (cnt % 16 == 0) ql_dbg(level, vha, id, "%04x: ", cnt);
ql_dbg(level, vha, id, "%04x:", cnt & ~0xFU); print_hex_dump(KERN_CONT, "", DUMP_PREFIX_NONE, 16, 1,
printk(" %02x", *buf); buf + cnt, min(16U, size - cnt), false);
if (cnt % 16 == 15)
printk("\n");
} }
if (cnt % 16 != 0)
printk("\n");
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment