Skip to content

Commit 6411307

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: snic: Simplify alloc_workqueue() invocations
Let alloc_workqueue() format the workqueue name instead of calling snprintf() explicitly. Not setting shost->work_q_name is safe because there is no code that reads the value set by the removed code. 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 19d7cda commit 6411307

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/scsi/snic/snic_main.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,8 @@ snic_add_host(struct Scsi_Host *shost, struct pci_dev *pdev)
300300
}
301301

302302
SNIC_BUG_ON(shost->work_q != NULL);
303-
snprintf(shost->work_q_name, sizeof(shost->work_q_name), "scsi_wq_%d",
304-
shost->host_no);
305-
shost->work_q = alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM,
306-
shost->work_q_name);
303+
shost->work_q = alloc_ordered_workqueue("scsi_wq_%d", WQ_MEM_RECLAIM,
304+
shost->host_no);
307305
if (!shost->work_q) {
308306
SNIC_HOST_ERR(shost, "Failed to Create ScsiHost wq.\n");
309307

0 commit comments

Comments
 (0)