summaryrefslogtreecommitdiff
path: root/drivers/scsi/sr.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.com>2021-04-27 11:30:20 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2021-06-01 05:48:22 +0300
commit54c29086195fd72b6a290ef367e71f73fa657b1f (patch)
tree10e8b7eb6cb3e5eb9843c7a0bc17d1b8af7bc33b /drivers/scsi/sr.c
parentb840abeffc23c5bf2e4dd53f0448d72bdedf1666 (diff)
downloadlinux-54c29086195fd72b6a290ef367e71f73fa657b1f.tar.xz
scsi: core: Drop the now obsolete driver_byte definitions
The driver_byte field in the result is now unused, so we can drop the definitions. Link: https://lore.kernel.org/r/20210427083046.31620-15-hare@suse.de Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r--drivers/scsi/sr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c
index 9b2ccf0c9a8c..e9cb874f6891 100644
--- a/drivers/scsi/sr.c
+++ b/drivers/scsi/sr.c
@@ -338,7 +338,7 @@ static int sr_done(struct scsi_cmnd *SCpnt)
* care is taken to avoid unnecessary additional work such as
* memcpy's that could be avoided.
*/
- if (driver_byte(result) != 0 && /* An error occurred */
+ if (status_byte(result) == SAM_STAT_CHECK_CONDITION &&
(SCpnt->sense_buffer[0] & 0x7f) == 0x70) { /* Sense current */
switch (SCpnt->sense_buffer[2]) {
case MEDIUM_ERROR: