scsi: qedi: Simplify an alloc_workqueue() invocation
authorBart Van Assche <bvanassche@acm.org>
Thu, 22 Aug 2024 19:59:17 +0000 (12:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 23 Aug 2024 01:28:56 +0000 (21:28 -0400)
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-14-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qedi/qedi_main.c

index 319c1da549f701413eae85972a03fdeedef9b57d..c5aec26019d6abee20ff91a074b0322f057b527c 100644 (file)
@@ -2776,9 +2776,9 @@ retry_probe:
                        goto free_cid_que;
                }
 
-               sprintf(host_buf, "qedi_ofld%d", qedi->shost->host_no);
-               qedi->offload_thread =
-                       alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, host_buf);
+               qedi->offload_thread = alloc_workqueue("qedi_ofld%d",
+                                                      WQ_MEM_RECLAIM,
+                                                      1, qedi->shost->host_no);
                if (!qedi->offload_thread) {
                        QEDI_ERR(&qedi->dbg_ctx,
                                 "Unable to start offload thread!\n");