mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
scsi: myrb: Simplify an alloc_ordered_workqueue() invocation
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-11-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
b3b359ac72
commit
c57a617fd5
@ -112,10 +112,8 @@ static bool myrb_create_mempools(struct pci_dev *pdev, struct myrb_hba *cb)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(cb->work_q_name, sizeof(cb->work_q_name),
|
cb->work_q = alloc_ordered_workqueue("myrb_wq_%d", WQ_MEM_RECLAIM,
|
||||||
"myrb_wq_%d", cb->host->host_no);
|
cb->host->host_no);
|
||||||
cb->work_q =
|
|
||||||
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, cb->work_q_name);
|
|
||||||
if (!cb->work_q) {
|
if (!cb->work_q) {
|
||||||
dma_pool_destroy(cb->dcdb_pool);
|
dma_pool_destroy(cb->dcdb_pool);
|
||||||
cb->dcdb_pool = NULL;
|
cb->dcdb_pool = NULL;
|
||||||
|
@ -712,7 +712,6 @@ struct myrb_hba {
|
|||||||
struct Scsi_Host *host;
|
struct Scsi_Host *host;
|
||||||
|
|
||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user