Skip to content

Commit f306791

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: myrs: 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 c57a617 commit f306791

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

drivers/scsi/myrs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2206,10 +2206,8 @@ static bool myrs_create_mempools(struct pci_dev *pdev, struct myrs_hba *cs)
22062206
return false;
22072207
}
22082208

2209-
snprintf(cs->work_q_name, sizeof(cs->work_q_name),
2210-
"myrs_wq_%d", shost->host_no);
2211-
cs->work_q =
2212-
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, cs->work_q_name);
2209+
cs->work_q = alloc_ordered_workqueue("myrs_wq_%d", WQ_MEM_RECLAIM,
2210+
shost->host_no);
22132211
if (!cs->work_q) {
22142212
dma_pool_destroy(cs->dcdb_pool);
22152213
cs->dcdb_pool = NULL;

drivers/scsi/myrs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,6 @@ struct myrs_hba {
904904
bool disable_enc_msg;
905905

906906
struct workqueue_struct *work_q;
907-
char work_q_name[20];
908907
struct delayed_work monitor_work;
909908
unsigned long primary_monitor_time;
910909
unsigned long secondary_monitor_time;

0 commit comments

Comments
 (0)