From a9a47bf58ac1d5525ae99922e055d8de87eeae78 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Fri, 24 Oct 2014 14:26:57 +0200 Subject: 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 Reviewed-by: Robert Elliott Signed-off-by: Christoph Hellwig --- include/scsi/scsi_dbg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/scsi') 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 *, -- cgit v1.2.3