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:
Hannes Reinecke
2014-10-24 14:26:45 +02:00
committed by Christoph Hellwig
parent 22e0d99415
commit d811b848eb
18 changed files with 107 additions and 98 deletions

View File

@@ -259,9 +259,10 @@ static int osst_chk_result(struct osst_tape * STp, struct osst_request * SRpnt)
SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2],
SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]);
if (scode) printk(OSST_DEB_MSG "%s:D: Sense: %02x, ASC: %02x, ASCQ: %02x\n",
name, scode, sense[12], sense[13]);
name, scode, sense[12], sense[13]);
if (cmdstatp->have_sense)
__scsi_print_sense("osst ", SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
__scsi_print_sense(STp->device, name,
SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
}
else
#endif
@@ -275,7 +276,8 @@ static int osst_chk_result(struct osst_tape * STp, struct osst_request * SRpnt)
SRpnt->cmd[0] != TEST_UNIT_READY)) { /* Abnormal conditions for tape */
if (cmdstatp->have_sense) {
printk(KERN_WARNING "%s:W: Command with sense data:\n", name);
__scsi_print_sense("osst ", SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
__scsi_print_sense(STp->device, name,
SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
}
else {
static int notyetprinted = 1;