Skip to content

Commit c57a617

Browse files
bvanasschemartinkpetersen
authored andcommitted
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 <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Martin K. Petersen <[email protected]>
1 parent b3b359a commit c57a617

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

drivers/scsi/myrb.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ static bool myrb_create_mempools(struct pci_dev *pdev, struct myrb_hba *cb)
112112
return false;
113113
}
114114

115-
snprintf(cb->work_q_name, sizeof(cb->work_q_name),
116-
"myrb_wq_%d", cb->host->host_no);
117-
cb->work_q =
118-
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, cb->work_q_name);
115+
cb->work_q = alloc_ordered_workqueue("myrb_wq_%d", WQ_MEM_RECLAIM,
116+
cb->host->host_no);
119117
if (!cb->work_q) {
120118
dma_pool_destroy(cb->dcdb_pool);
121119
cb->dcdb_pool = NULL;

drivers/scsi/myrb.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ struct myrb_hba {
712712
struct Scsi_Host *host;
713713

714714
struct workqueue_struct *work_q;
715-
char work_q_name[20];
716715
struct delayed_work monitor_work;
717716
unsigned long primary_monitor_time;
718717
unsigned long secondary_monitor_time;

0 commit comments

Comments
 (0)