diff mbox

[scsi-next] scsi: core: remove redundant assignment to shost->use_blk_mq

Message ID 20180328164142.27201-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show

Commit Message

Colin King March 28, 2018, 4:41 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

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>
---
 drivers/scsi/hosts.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Bart Van Assche March 28, 2018, 4:49 p.m. UTC | #1
On Wed, 2018-03-28 at 17:41 +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>

> 

> 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")


Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Martin K. Petersen March 28, 2018, 10:10 p.m. UTC | #2
Colin,

> The first assignment to shost->use_blk_mq is redundant as it is
> overwritten by the following statement. Remove this redundant code.

Applied to 4.16/scsi-fixes. Thank you!
diff mbox

Patch

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index 7649d63a1b8d..3771e59a9fae 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -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);