diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-25 13:46:33 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-25 17:08:08 -0400 |
commit | 0624cbb1e2e64ae4d7d55dc81fc39a0af87a2bd7 (patch) | |
tree | e070944a3dd8aeb9583276371d5fa412a3b4e721 /drivers/scsi/sr.c | |
parent | bed2213d01de474eb8a6f3891070eec6be6fe772 (diff) | |
download | linux-0624cbb1e2e64ae4d7d55dc81fc39a0af87a2bd7.tar.gz linux-0624cbb1e2e64ae4d7d55dc81fc39a0af87a2bd7.tar.bz2 linux-0624cbb1e2e64ae4d7d55dc81fc39a0af87a2bd7.zip |
scsi: sd: sr: Convert two assignments into warning statements
Before scsi_prep_fn() calls the ULP .init_command() callback
function it stores the SCSI command pointer in request.special.
This means that the SCpnt = rq->special assignments in the sd
and sr drivers assign a pointer to itself. Hence convert these
two assignment statements into warning statements.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index a8f630213a1a..9be34d37c356 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -393,7 +393,7 @@ static int sr_init_command(struct scsi_cmnd *SCpnt) ret = scsi_init_io(SCpnt); if (ret != BLKPREP_OK) goto out; - SCpnt = rq->special; + WARN_ON_ONCE(SCpnt != rq->special); cd = scsi_cd(rq->rq_disk); /* from here on until we're complete, any goto out |