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

index fbee7db4a835d4fc7841eaf514c12dbfee8221f2..0e81125df8c72dab54e240fe7ed04562658b077a 100644 (file)
@@ -334,7 +334,6 @@ struct st_hba {
        struct st_ccb *wait_ccb;
        __le32 *scratch;
 
-       char work_q_name[20];
        struct workqueue_struct *work_q;
        struct work_struct reset_work;
        wait_queue_head_t reset_waitq;
@@ -1795,10 +1794,8 @@ static int stex_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        hba->pdev = pdev;
        init_waitqueue_head(&hba->reset_waitq);
 
-       snprintf(hba->work_q_name, sizeof(hba->work_q_name),
-                "stex_wq_%d", host->host_no);
-       hba->work_q =
-               alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, hba->work_q_name);
+       hba->work_q = alloc_ordered_workqueue("stex_wq_%d", WQ_MEM_RECLAIM,
+                                             host->host_no);
        if (!hba->work_q) {
                printk(KERN_ERR DRV_NAME "(%s): create workqueue failed\n",
                        pci_name(pdev));