scsi: repurpose the last argument from print_opcode_name()

print_opcode_name() was only ever called with a '0' argument
from LLDDs and ULDs which were _not_ supporting variable length
CDBs, so the 'if' clause was never triggered.
Instead we should be using the last argument to specify
the cdb length to avoid accidental overflow when reading
the cdb buffer.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
这个提交包含在:
Hannes Reinecke
2014-10-24 14:26:57 +02:00
提交者 Christoph Hellwig
父节点 2478a736a7
当前提交 a9a47bf58a
修改 5 个文件,包含 27 行新增30 行删除

查看文件

@@ -2424,7 +2424,7 @@ int fas216_eh_abort(struct scsi_cmnd *SCpnt)
info->stats.aborts += 1;
printk(KERN_WARNING "scsi%d: abort command ", info->host->host_no);
__scsi_print_command(SCpnt->cmnd);
__scsi_print_command(SCpnt->cmnd, SCpnt->cmd_len);
print_debug_list();
fas216_dumpstate(info);