[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240630222904.627462-40-bvanassche@acm.org>
Date: Sun, 30 Jun 2024 15:26:57 -0700
From: Bart Van Assche <bvanassche@....org>
To: Tejun Heo <tj@...nel.org>
Cc: Lai Jiangshan <jiangshanlai@...il.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
Vishal Bhakta <vishal.bhakta@...adcom.com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>
Subject: [PATCH 39/53] scsi: vmw_pvscsi: Simplify a create*_workqueue() call
Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called.
Cc: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Bart Van Assche <bvanassche@....org>
---
drivers/scsi/vmw_pvscsi.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index c4fea077265e..40ad8a3a32e0 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -1123,8 +1123,6 @@ static void pvscsi_msg_workqueue_handler(struct work_struct *data)
static int pvscsi_setup_msg_workqueue(struct pvscsi_adapter *adapter)
{
- char name[32];
-
if (!pvscsi_use_msg)
return 0;
@@ -1134,10 +1132,8 @@ static int pvscsi_setup_msg_workqueue(struct pvscsi_adapter *adapter)
if (pvscsi_reg_read(adapter, PVSCSI_REG_OFFSET_COMMAND_STATUS) == -1)
return 0;
- snprintf(name, sizeof(name),
- "vmw_pvscsi_wq_%u", adapter->host->host_no);
-
- adapter->workqueue = create_singlethread_workqueue(name);
+ adapter->workqueue = create_singlethread_workqueue2(
+ "vmw_pvscsi_wq_%u", adapter->host->host_no);
if (!adapter->workqueue) {
printk(KERN_ERR "vmw_pvscsi: failed to create work queue\n");
return 0;
Powered by blists - more mailing lists