diff options
author | Hannes Reinecke <hare@suse.de> | 2014-10-24 08:26:45 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2014-11-12 05:15:58 -0500 |
commit | d811b848ebb78a1135658aa20a80e31994df47f7 (patch) | |
tree | 6393a9ce22d3cb9bbca4ac09d9280a4c835cb482 /drivers/usb/storage/debug.c | |
parent | 22e0d994151c3eac183625f8c1400c0c83ac414f (diff) |
scsi: use sdev as argument for sense code printing
We should be using the standard dev_printk() variants for
sense code printing.
[hch: remove __scsi_print_sense call in xen-scsiback, Acked by Juergen]
[hch: folded bracing fix from Dan Carpenter]
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 'drivers/usb/storage/debug.c')
-rw-r--r-- | drivers/usb/storage/debug.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/storage/debug.c b/drivers/usb/storage/debug.c index e08f64780e30..66a684a29938 100644 --- a/drivers/usb/storage/debug.c +++ b/drivers/usb/storage/debug.c | |||
@@ -164,10 +164,10 @@ void usb_stor_show_sense(const struct us_data *us, | |||
164 | unsigned char asc, | 164 | unsigned char asc, |
165 | unsigned char ascq) | 165 | unsigned char ascq) |
166 | { | 166 | { |
167 | const char *what, *keystr; | 167 | const char *what, *keystr, *fmt; |
168 | 168 | ||
169 | keystr = scsi_sense_key_string(key); | 169 | keystr = scsi_sense_key_string(key); |
170 | what = scsi_extd_sense_format(asc, ascq); | 170 | what = scsi_extd_sense_format(asc, ascq, &fmt); |
171 | 171 | ||
172 | if (keystr == NULL) | 172 | if (keystr == NULL) |
173 | keystr = "(Unknown Key)"; | 173 | keystr = "(Unknown Key)"; |
@@ -175,8 +175,10 @@ void usb_stor_show_sense(const struct us_data *us, | |||
175 | what = "(unknown ASC/ASCQ)"; | 175 | what = "(unknown ASC/ASCQ)"; |
176 | 176 | ||
177 | usb_stor_dbg(us, "%s: ", keystr); | 177 | usb_stor_dbg(us, "%s: ", keystr); |
178 | US_DEBUGPX(what, ascq); | 178 | if (fmt) |
179 | US_DEBUGPX("\n"); | 179 | US_DEBUGPX("%s (%s%x)\n", what, fmt, ascq); |
180 | else | ||
181 | US_DEBUGPX("%s\n", what); | ||
180 | } | 182 | } |
181 | 183 | ||
182 | int usb_stor_dbg(const struct us_data *us, const char *fmt, ...) | 184 | int usb_stor_dbg(const struct us_data *us, const char *fmt, ...) |