aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-10-24 14:26:57 +0200
committerChristoph Hellwig <hch@lst.de>2014-11-12 11:16:03 +0100
commita9a47bf58ac1d5525ae99922e055d8de87eeae78 (patch)
treeb6f3e5f7ed4879e19fb898774dcd2db8e6e3c43c /include/scsi
parentscsi: consolidate opcode lookup in scsi_opcode_sa_name() (diff)
downloadlinux-dev-a9a47bf58ac1d5525ae99922e055d8de87eeae78.tar.xz
linux-dev-a9a47bf58ac1d5525ae99922e055d8de87eeae78.zip
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>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_dbg.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h
index 386474ee53a1..81d041822229 100644
--- a/include/scsi/scsi_dbg.h
+++ b/include/scsi/scsi_dbg.h
@@ -6,7 +6,7 @@ struct scsi_device;
struct scsi_sense_hdr;
extern void scsi_print_command(struct scsi_cmnd *);
-extern void __scsi_print_command(unsigned char *);
+extern void __scsi_print_command(const unsigned char *, size_t);
extern void scsi_show_extd_sense(const struct scsi_device *, const char *,
unsigned char, unsigned char);
extern void scsi_show_sense_hdr(const struct scsi_device *, const char *,