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>
This commit is contained in:

committed by
Christoph Hellwig

parent
22e0d99415
commit
d811b848eb
@@ -164,10 +164,10 @@ void usb_stor_show_sense(const struct us_data *us,
|
||||
unsigned char asc,
|
||||
unsigned char ascq)
|
||||
{
|
||||
const char *what, *keystr;
|
||||
const char *what, *keystr, *fmt;
|
||||
|
||||
keystr = scsi_sense_key_string(key);
|
||||
what = scsi_extd_sense_format(asc, ascq);
|
||||
what = scsi_extd_sense_format(asc, ascq, &fmt);
|
||||
|
||||
if (keystr == NULL)
|
||||
keystr = "(Unknown Key)";
|
||||
@@ -175,8 +175,10 @@ void usb_stor_show_sense(const struct us_data *us,
|
||||
what = "(unknown ASC/ASCQ)";
|
||||
|
||||
usb_stor_dbg(us, "%s: ", keystr);
|
||||
US_DEBUGPX(what, ascq);
|
||||
US_DEBUGPX("\n");
|
||||
if (fmt)
|
||||
US_DEBUGPX("%s (%s%x)\n", what, fmt, ascq);
|
||||
else
|
||||
US_DEBUGPX("%s\n", what);
|
||||
}
|
||||
|
||||
int usb_stor_dbg(const struct us_data *us, const char *fmt, ...)
|
||||
|
Reference in New Issue
Block a user