scsi: myrs: Simplify an alloc_ordered_workqueue() invocation

JIRA: https://issues.redhat.com/browse/RHEL-62151
Upstream Status: From upstream linux mainline

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>
(cherry picked from commit f30679166255148f7781b0726d8e1b5e22dd5b48)
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
This commit is contained in:
Ewan D. Milne 2024-10-15 15:40:57 -04:00
parent 3c7b55d893
commit dadf08e556
2 changed files with 2 additions and 5 deletions

View File

@ -2203,10 +2203,8 @@ static bool myrs_create_mempools(struct pci_dev *pdev, struct myrs_hba *cs)
return false; return false;
} }
snprintf(cs->work_q_name, sizeof(cs->work_q_name), cs->work_q = alloc_ordered_workqueue("myrs_wq_%d", WQ_MEM_RECLAIM,
"myrs_wq_%d", shost->host_no); shost->host_no);
cs->work_q =
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, cs->work_q_name);
if (!cs->work_q) { if (!cs->work_q) {
dma_pool_destroy(cs->dcdb_pool); dma_pool_destroy(cs->dcdb_pool);
cs->dcdb_pool = NULL; cs->dcdb_pool = NULL;

View File

@ -904,7 +904,6 @@ struct myrs_hba {
bool disable_enc_msg; bool disable_enc_msg;
struct workqueue_struct *work_q; struct workqueue_struct *work_q;
char work_q_name[20];
struct delayed_work monitor_work; struct delayed_work monitor_work;
unsigned long primary_monitor_time; unsigned long primary_monitor_time;
unsigned long secondary_monitor_time; unsigned long secondary_monitor_time;