]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: be2iscsi: Simplify an alloc_workqueue() invocation
authorBart Van Assche <bvanassche@acm.org>
Thu, 22 Aug 2024 19:59:07 +0000 (12:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 23 Aug 2024 01:28:55 +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-4-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/be2iscsi/be_main.c

index 06acb5ff609ee719b0c72439dcd30d79468b32c6..76a1e373386efb22580da5aa6aaa5e50c5e78f10 100644 (file)
@@ -5528,7 +5528,6 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
        struct beiscsi_hba *phba = NULL;
        struct be_eq_obj *pbe_eq;
        unsigned int s_handle;
-       char wq_name[20];
        int ret, i;
 
        ret = beiscsi_enable_pci(pcidev);
@@ -5634,9 +5633,8 @@ static int beiscsi_dev_probe(struct pci_dev *pcidev,
 
        phba->ctrl.mcc_alloc_index = phba->ctrl.mcc_free_index = 0;
 
-       snprintf(wq_name, sizeof(wq_name), "beiscsi_%02x_wq",
-                phba->shost->host_no);
-       phba->wq = alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, wq_name);
+       phba->wq = alloc_workqueue("beiscsi_%02x_wq", WQ_MEM_RECLAIM, 1,
+                                  phba->shost->host_no);
        if (!phba->wq) {
                beiscsi_log(phba, KERN_ERR, BEISCSI_LOG_INIT,
                            "BM_%d : beiscsi_dev_probe-"