OSDN Git Service

scsi: core: remove redundant assignment to shost->use_blk_mq
authorColin Ian King <colin.king@canonical.com>
Wed, 28 Mar 2018 16:41:42 +0000 (17:41 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 9 Apr 2018 20:34:41 +0000 (16:34 -0400)
The first assignment to shost->use_blk_mq is redundant as it is
overwritten by the following statement. Remove this redundant code.

Detected by CoverityScan, CID#1466993 ("Unused value")

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hosts.c

index 7649d63..3771e59 100644 (file)
@@ -472,7 +472,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
        else
                shost->dma_boundary = 0xffffffff;
 
-       shost->use_blk_mq = scsi_use_blk_mq;
        shost->use_blk_mq = scsi_use_blk_mq || shost->hostt->force_blk_mq;
 
        device_initialize(&shost->shost_gendev);