Re: [PATCH] scsi: qla2xxx: remove the unused tcm_qla2xxx_cmd_wq

From: Laurence Oberman
Date: Wed May 02 2018 - 17:04:15 EST


On Wed, 2018-05-02 at 13:31 -0700, Andrei Vagin wrote:
> Signed-off-by: Andrei Vagin <avagin@xxxxxxxxxx>
> ---
> Â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@xxxxxxxxxx>