[PATCH 38/53] scsi: qla4xxx: Simplify a create*_workqueue() call

From: Bart Van Assche
Date: Sun Jun 30 2024 - 18:38:23 EST


Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called.

Cc: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
drivers/scsi/qla4xxx/ql4_os.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 17cccd14765f..267c459376ed 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -8630,7 +8630,6 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
struct Scsi_Host *host;
struct scsi_qla_host *ha;
uint8_t init_retry_count = 0;
- char buf[34];
struct qla4_8xxx_legacy_intr_set *nx_legacy_intr;
uint32_t dev_state;

@@ -8805,8 +8804,8 @@ static int qla4xxx_probe_adapter(struct pci_dev *pdev,
/* Startup the kernel thread for this host adapter. */
DEBUG2(printk("scsi: %s: Starting kernel thread for "
"qla4xxx_dpc\n", __func__));
- sprintf(buf, "qla4xxx_%lu_dpc", ha->host_no);
- ha->dpc_thread = create_singlethread_workqueue(buf);
+ ha->dpc_thread =
+ create_singlethread_workqueue2("qla4xxx_%lu_dpc", ha->host_no);
if (!ha->dpc_thread) {
ql4_printk(KERN_WARNING, ha, "Unable to start DPC thread!\n");
ret = -ENODEV;