diff mbox

scsi: qla2xxx: remove the unused tcm_qla2xxx_cmd_wq

Message ID 20180502203113.13183-1-avagin@openvz.org (mailing list archive)
State Accepted
Headers show

Commit Message

Andrey Vagin May 2, 2018, 8:31 p.m. UTC
Signed-off-by: Andrei Vagin <avagin@openvz.org>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 10 ----------
 1 file changed, 10 deletions(-)

Comments

Laurence Oberman May 2, 2018, 9:04 p.m. UTC | #1
On Wed, 2018-05-02 at 13:31 -0700, Andrei Vagin wrote:
> Signed-off-by: Andrei Vagin <avagin@openvz.org>
> ---
>  drivers/scsi/qla2xxx/tcm_qla2xxx.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index aadfeaac3898..b63440fec18e 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -48,7 +48,6 @@
>  #include "tcm_qla2xxx.h"
>  
>  static struct workqueue_struct *tcm_qla2xxx_free_wq;
> -static struct workqueue_struct *tcm_qla2xxx_cmd_wq;
>  
>  /*
>   * Parse WWN.
> @@ -1976,16 +1975,8 @@ static int tcm_qla2xxx_register_configfs(void)
>  		goto out_fabric_npiv;
>  	}
>  
> -	tcm_qla2xxx_cmd_wq = alloc_workqueue("tcm_qla2xxx_cmd", 0,
> 0);
> -	if (!tcm_qla2xxx_cmd_wq) {
> -		ret = -ENOMEM;
> -		goto out_free_wq;
> -	}
> -
>  	return 0;
>  
> -out_free_wq:
> -	destroy_workqueue(tcm_qla2xxx_free_wq);
>  out_fabric_npiv:
>  	target_unregister_template(&tcm_qla2xxx_npiv_ops);
>  out_fabric:
> @@ -1995,7 +1986,6 @@ static int tcm_qla2xxx_register_configfs(void)
>  
>  static void tcm_qla2xxx_deregister_configfs(void)
>  {
> -	destroy_workqueue(tcm_qla2xxx_cmd_wq);
>  	destroy_workqueue(tcm_qla2xxx_free_wq);
>  
>  	target_unregister_template(&tcm_qla2xxx_ops);
When I first saw this I thought, no way, it must be used, but when I
had a closer look and checked its indeed not used or even made
external.

This looks OK to me.

Reviewed-by: Laurence Oberman <loberman@redhat.com>
Martin K. Petersen May 8, 2018, 5:25 a.m. UTC | #2
Andrei,

Applied to 4.18/scsi-queue. thanks!
diff mbox

Patch

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index aadfeaac3898..b63440fec18e 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -48,7 +48,6 @@ 
 #include "tcm_qla2xxx.h"
 
 static struct workqueue_struct *tcm_qla2xxx_free_wq;
-static struct workqueue_struct *tcm_qla2xxx_cmd_wq;
 
 /*
  * Parse WWN.
@@ -1976,16 +1975,8 @@  static int tcm_qla2xxx_register_configfs(void)
 		goto out_fabric_npiv;
 	}
 
-	tcm_qla2xxx_cmd_wq = alloc_workqueue("tcm_qla2xxx_cmd", 0, 0);
-	if (!tcm_qla2xxx_cmd_wq) {
-		ret = -ENOMEM;
-		goto out_free_wq;
-	}
-
 	return 0;
 
-out_free_wq:
-	destroy_workqueue(tcm_qla2xxx_free_wq);
 out_fabric_npiv:
 	target_unregister_template(&tcm_qla2xxx_npiv_ops);
 out_fabric:
@@ -1995,7 +1986,6 @@  static int tcm_qla2xxx_register_configfs(void)
 
 static void tcm_qla2xxx_deregister_configfs(void)
 {
-	destroy_workqueue(tcm_qla2xxx_cmd_wq);
 	destroy_workqueue(tcm_qla2xxx_free_wq);
 
 	target_unregister_template(&tcm_qla2xxx_ops);