diff mbox

scsi: hosts: remove redundant assingment of shost->use_blk_mq

Message ID 20180402093749.6862-1-jthumshirn@suse.de (mailing list archive)
State Not Applicable
Headers show

Commit Message

Johannes Thumshirn April 2, 2018, 9:37 a.m. UTC
Coverity reports that we're assigning shost->use_blk_mq twice. This
looks like the result of a bad merge of commit 2f31115e940c ("scsi:
core: introduce force_blk_mq")

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
---
 drivers/scsi/hosts.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Bart Van Assche April 2, 2018, 1:53 p.m. UTC | #1
On Mon, 2018-04-02 at 11:37 +0200, Johannes Thumshirn wrote:
> Coverity reports that we're assigning shost->use_blk_mq twice. This

> looks like the result of a bad merge of commit 2f31115e940c ("scsi:

> core: introduce force_blk_mq")

> 

> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>

> ---

>  drivers/scsi/hosts.c | 1 -

>  1 file changed, 1 deletion(-)

> 

> diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c

> index ef22b275d050..c36f2a44e5ed 100644

> --- a/drivers/scsi/hosts.c

> +++ b/drivers/scsi/hosts.c

> @@ -473,7 +473,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);


A similar patch has already been queued by Martin. See also
https://patchwork.kernel.org/patch/10313569/.

Bart.
Johannes Thumshirn April 3, 2018, 7:40 a.m. UTC | #2
On Mon, 2018-04-02 at 13:53 +0000, Bart Van Assche wrote:
> A similar patch has already been queued by Martin. See also
> https://patchwork.kernel.org/patch/10313569/.

Ah OK, fine then :-)
diff mbox

Patch

diff --git a/drivers/scsi/hosts.c b/drivers/scsi/hosts.c
index ef22b275d050..c36f2a44e5ed 100644
--- a/drivers/scsi/hosts.c
+++ b/drivers/scsi/hosts.c
@@ -473,7 +473,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);