]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: myrs: Simplify an alloc_ordered_workqueue() invocation
authorBart Van Assche <bvanassche@acm.org>
Thu, 22 Aug 2024 19:59:15 +0000 (12:59 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 23 Aug 2024 01:28:56 +0000 (21:28 -0400)
Let alloc_ordered_workqueue() format the workqueue name instead of calling
snprintf() explicitly.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20240822195944.654691-12-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/myrs.c
drivers/scsi/myrs.h

index 8a8f26633cda218a6595d85abfcb9512c35df524..3392feb15cb4076a0ca94e97e1801b9faaeaa9bc 100644 (file)
@@ -2206,10 +2206,8 @@ static bool myrs_create_mempools(struct pci_dev *pdev, struct myrs_hba *cs)
                return false;
        }
 
-       snprintf(cs->work_q_name, sizeof(cs->work_q_name),
-                "myrs_wq_%d", shost->host_no);
-       cs->work_q =
-               alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, cs->work_q_name);
+       cs->work_q = alloc_ordered_workqueue("myrs_wq_%d", WQ_MEM_RECLAIM,
+                                            shost->host_no);
        if (!cs->work_q) {
                dma_pool_destroy(cs->dcdb_pool);
                cs->dcdb_pool = NULL;
index 9f6696d0ddd5f79c30c76b459c6f4277cfe0a4ad..e1d6b123de7be5f9ad6e2f007e79c31fc15195dd 100644 (file)
@@ -904,7 +904,6 @@ struct myrs_hba {
        bool disable_enc_msg;
 
        struct workqueue_struct *work_q;
-       char work_q_name[20];
        struct delayed_work monitor_work;
        unsigned long primary_monitor_time;
        unsigned long secondary_monitor_time;