Skip to content

Commit 5615cfb

Browse files
bvanasschemartinkpetersen
authored andcommitted
scsi: ibmvscsi_tgt: Simplify an alloc_workqueue() invocation
Let alloc_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 d77381c commit 5615cfb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3425,7 +3425,6 @@ static int ibmvscsis_probe(struct vio_dev *vdev,
34253425
struct scsi_info *vscsi;
34263426
int rc = 0;
34273427
long hrc = 0;
3428-
char wq_name[24];
34293428

34303429
vscsi = kzalloc(sizeof(*vscsi), GFP_KERNEL);
34313430
if (!vscsi) {
@@ -3536,8 +3535,8 @@ static int ibmvscsis_probe(struct vio_dev *vdev,
35363535
init_completion(&vscsi->wait_idle);
35373536
init_completion(&vscsi->unconfig);
35383537

3539-
snprintf(wq_name, 24, "ibmvscsis%s", dev_name(&vdev->dev));
3540-
vscsi->work_q = alloc_workqueue("%s", WQ_MEM_RECLAIM, 1, wq_name);
3538+
vscsi->work_q = alloc_workqueue("ibmvscsis%s", WQ_MEM_RECLAIM, 1,
3539+
dev_name(&vdev->dev));
35413540
if (!vscsi->work_q) {
35423541
rc = -ENOMEM;
35433542
dev_err(&vscsi->dev, "create_workqueue failed\n");

0 commit comments

Comments
 (0)