Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called. Not setting
shost->work_q_name is safe because there is no code that reads this
struct member. Additionally, a later patch removes this struct member.
Cc: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/snic/snic_main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c
index cc824dcfe7da..676ccf41b9da 100644
--- a/drivers/scsi/snic/snic_main.c
+++ b/drivers/scsi/snic/snic_main.c
@@ -300,9 +300,8 @@ snic_add_host(struct Scsi_Host *shost, struct pci_dev *pdev)
}
SNIC_BUG_ON(shost->work_q != NULL);
- snprintf(shost->work_q_name, sizeof(shost->work_q_name), "scsi_wq_%d",
- shost->host_no);
- shost->work_q = create_singlethread_workqueue(shost->work_q_name);
+ shost->work_q =
+ create_singlethread_workqueue2("scsi_wq_%d", shost->host_no);
if (!shost->work_q) {
SNIC_HOST_ERR(shost, "Failed to Create ScsiHost wq.\n");