diff mbox series

[6/6] scsi: iscsi: Drop temp workq_name.

Message ID 20220226230435.38733-7-michael.christie@oracle.com
State New
Headers show
Series iscsi: Speed up failover with lots of devices. | expand

Commit Message

Mike Christie Feb. 26, 2022, 11:04 p.m. UTC
When the workqueue code was created it didn't allow variable args so we
have been using a temp buffer. Drop that.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
 drivers/scsi/libiscsi.c | 6 ++----
 include/scsi/libiscsi.h | 1 -
 2 files changed, 2 insertions(+), 5 deletions(-)

Comments

Chris Leech Feb. 28, 2022, 8:08 p.m. UTC | #1
On 2/26/22 3:04 PM, Mike Christie wrote:
> When the workqueue code was created it didn't allow variable args so we
> have been using a temp buffer. Drop that.
> 
> Signed-off-by: Mike Christie <michael.christie@oracle.com>
> ---
>  drivers/scsi/libiscsi.c | 6 ++----
>  include/scsi/libiscsi.h | 1 -
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 059dae8909ee..a75b85f0a189 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -2798,11 +2798,9 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
>  	ihost = shost_priv(shost);
>  
>  	if (xmit_can_sleep) {
> -		snprintf(ihost->workq_name, sizeof(ihost->workq_name),
> -			"iscsi_q_%d", shost->host_no);
> -		ihost->workq = alloc_workqueue("%s",
> +		ihost->workq = alloc_workqueue("iscsi_q_%d",
>  			WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
> -			1, ihost->workq_name);
> +			1, shost->host_no);
>  		if (!ihost->workq)
>  			goto free_host;
>  	}
> diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
> index 4ee233e5a6ff..2d85810d1929 100644
> --- a/include/scsi/libiscsi.h
> +++ b/include/scsi/libiscsi.h
> @@ -371,7 +371,6 @@ struct iscsi_host {
>  	int			state;
>  
>  	struct workqueue_struct	*workq;
> -	char			workq_name[20];
>  };
>  
>  /*

Reviewed-by: Chris Leech <cleech@redhat.com>
Lee Duncan Feb. 28, 2022, 10:49 p.m. UTC | #2
On 2/26/22 15:04, Mike Christie wrote:
> When the workqueue code was created it didn't allow variable args so we
> have been using a temp buffer. Drop that.
> 
> Signed-off-by: Mike Christie <michael.christie@oracle.com>
> ---
>   drivers/scsi/libiscsi.c | 6 ++----
>   include/scsi/libiscsi.h | 1 -
>   2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
> index 059dae8909ee..a75b85f0a189 100644
> --- a/drivers/scsi/libiscsi.c
> +++ b/drivers/scsi/libiscsi.c
> @@ -2798,11 +2798,9 @@ struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
>   	ihost = shost_priv(shost);
>   
>   	if (xmit_can_sleep) {
> -		snprintf(ihost->workq_name, sizeof(ihost->workq_name),
> -			"iscsi_q_%d", shost->host_no);
> -		ihost->workq = alloc_workqueue("%s",
> +		ihost->workq = alloc_workqueue("iscsi_q_%d",
>   			WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
> -			1, ihost->workq_name);
> +			1, shost->host_no);
>   		if (!ihost->workq)
>   			goto free_host;
>   	}
> diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
> index 4ee233e5a6ff..2d85810d1929 100644
> --- a/include/scsi/libiscsi.h
> +++ b/include/scsi/libiscsi.h
> @@ -371,7 +371,6 @@ struct iscsi_host {
>   	int			state;
>   
>   	struct workqueue_struct	*workq;
> -	char			workq_name[20];
>   };
>   
>   /*

Reviewed-by: Lee Duncan <lduncan@suse.com>
diff mbox series

Patch

diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 059dae8909ee..a75b85f0a189 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2798,11 +2798,9 @@  struct Scsi_Host *iscsi_host_alloc(struct scsi_host_template *sht,
 	ihost = shost_priv(shost);
 
 	if (xmit_can_sleep) {
-		snprintf(ihost->workq_name, sizeof(ihost->workq_name),
-			"iscsi_q_%d", shost->host_no);
-		ihost->workq = alloc_workqueue("%s",
+		ihost->workq = alloc_workqueue("iscsi_q_%d",
 			WQ_SYSFS | __WQ_LEGACY | WQ_MEM_RECLAIM | WQ_UNBOUND,
-			1, ihost->workq_name);
+			1, shost->host_no);
 		if (!ihost->workq)
 			goto free_host;
 	}
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h
index 4ee233e5a6ff..2d85810d1929 100644
--- a/include/scsi/libiscsi.h
+++ b/include/scsi/libiscsi.h
@@ -371,7 +371,6 @@  struct iscsi_host {
 	int			state;
 
 	struct workqueue_struct	*workq;
-	char			workq_name[20];
 };
 
 /*