summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2024-08-22 12:59:16 -0700
committerMartin K. Petersen <martin.petersen@oracle.com>2024-08-22 21:28:56 -0400
commit8bbe60bbd43daa215106d263538e0822c4bba172 (patch)
tree8bbef8b7bc8436ee61de7677325b81b9320e7675
parentf30679166255148f7781b0726d8e1b5e22dd5b48 (diff)
scsi: qedf: Simplify alloc_workqueue() invocations
Let alloc_workqueue() format the workqueue name instead of calling snprintf() explicitly. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240822195944.654691-13-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/qedf/qedf_main.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 119afcaf6e13..cf13148ba281 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -3372,10 +3372,8 @@ retry_probe:
QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_INFO, "qedf->io_mempool=%p.\n",
qedf->io_mempool);
- sprintf(host_buf, "qedf_%u_link",
- qedf->lport->host->host_no);
- qedf->link_update_wq =
- alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, host_buf);
+ qedf->link_update_wq = alloc_workqueue("qedf_%u_link", WQ_MEM_RECLAIM,
+ 1, qedf->lport->host->host_no);
INIT_DELAYED_WORK(&qedf->link_update, qedf_handle_link_update);
INIT_DELAYED_WORK(&qedf->link_recovery, qedf_link_recovery);
INIT_DELAYED_WORK(&qedf->grcdump_work, qedf_wq_grcdump);
@@ -3585,8 +3583,8 @@ retry_probe:
ether_addr_copy(params.ll2_mac_address, qedf->mac);
/* Start LL2 processing thread */
- snprintf(host_buf, 20, "qedf_%d_ll2", host->host_no);
- qedf->ll2_recv_wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, host_buf);
+ qedf->ll2_recv_wq = alloc_workqueue("qedf_%d_ll2", WQ_MEM_RECLAIM, 1,
+ host->host_no);
if (!qedf->ll2_recv_wq) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to LL2 workqueue.\n");
rc = -ENOMEM;
@@ -3627,9 +3625,8 @@ retry_probe:
}
}
- sprintf(host_buf, "qedf_%u_timer", qedf->lport->host->host_no);
- qedf->timer_work_queue =
- alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, host_buf);
+ qedf->timer_work_queue = alloc_workqueue("qedf_%u_timer",
+ WQ_MEM_RECLAIM, 1, qedf->lport->host->host_no);
if (!qedf->timer_work_queue) {
QEDF_ERR(&(qedf->dbg_ctx), "Failed to start timer "
"workqueue.\n");