[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240630222904.627462-30-bvanassche@acm.org>
Date: Sun, 30 Jun 2024 15:26:47 -0700
From: Bart Van Assche <bvanassche@....org>
To: Tejun Heo <tj@...nel.org>
Cc: Lai Jiangshan <jiangshanlai@...il.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
linux-kernel@...r.kernel.org,
Bart Van Assche <bvanassche@....org>,
Manish Chopra <manishc@...vell.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH 29/53] net: qed: Simplify a create*_workqueue() call
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@....org>
---
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;
Powered by blists - more mailing lists