Skip to content

Commit 0ef9b01

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: stex: Simplify an alloc_ordered_workqueue() invocation
Let alloc_ordered_workqueue() format the workqueue name instead of calling snprintf() explicitly. 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 06d5378 commit 0ef9b01

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/scsi/stex.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,6 @@ struct st_hba {
334334
struct st_ccb *wait_ccb;
335335
__le32 *scratch;
336336

337-
char work_q_name[20];
338337
struct workqueue_struct *work_q;
339338
struct work_struct reset_work;
340339
wait_queue_head_t reset_waitq;
@@ -1795,10 +1794,8 @@ static int stex_probe(struct pci_dev *pdev, const struct pci_device_id *id)
17951794
hba->pdev = pdev;
17961795
init_waitqueue_head(&hba->reset_waitq);
17971796

1798-
snprintf(hba->work_q_name, sizeof(hba->work_q_name),
1799-
"stex_wq_%d", host->host_no);
1800-
hba->work_q =
1801-
alloc_ordered_workqueue("%s", WQ_MEM_RECLAIM, hba->work_q_name);
1797+
hba->work_q = alloc_ordered_workqueue("stex_wq_%d", WQ_MEM_RECLAIM,
1798+
host->host_no);
18021799
if (!hba->work_q) {
18031800
printk(KERN_ERR DRV_NAME "(%s): create workqueue failed\n",
18041801
pci_name(pdev));

0 commit comments

Comments
 (0)