[PATCH 29/53] net: qed: Simplify a create*_workqueue() call
From: Bart Van Assche
Date: Sun Jun 30 2024 - 18:36:20 EST
Pass a format string to create*_workqueue2() instead of formatting the
workqueue name before create*_workqueue() is called.
Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
---
drivers/net/ethernet/qlogic/qed/qed_sriov.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qed/qed_sriov.c b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
index fa167b1aa019..29c5b301bbd7 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_sriov.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_sriov.c
@@ -5262,7 +5262,6 @@ void qed_iov_wq_stop(struct qed_dev *cdev, bool schedule_first)
int qed_iov_wq_start(struct qed_dev *cdev)
{
- char name[NAME_SIZE];
int i;
for_each_hwfn(cdev, i) {
@@ -5274,11 +5273,9 @@ int qed_iov_wq_start(struct qed_dev *cdev)
if (IS_PF(p_hwfn->cdev) && !IS_PF_SRIOV(p_hwfn))
continue;
- snprintf(name, NAME_SIZE, "iov-%02x:%02x.%02x",
- cdev->pdev->bus->number,
- PCI_SLOT(cdev->pdev->devfn), p_hwfn->abs_pf_id);
-
- p_hwfn->iov_wq = create_singlethread_workqueue(name);
+ p_hwfn->iov_wq = create_singlethread_workqueue2(
+ "iov-%02x:%02x.%02x", cdev->pdev->bus->number,
+ PCI_SLOT(cdev->pdev->devfn), p_hwfn->abs_pf_id);
if (!p_hwfn->iov_wq) {
DP_NOTICE(p_hwfn, "Cannot create iov workqueue\n");
return -ENOMEM;