[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240630222904.627462-24-bvanassche@acm.org>
Date: Sun, 30 Jun 2024 15:26:41 -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>,
Shannon Nelson <shannon.nelson@....com>,
Brett Creeley <brett.creeley@....com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH 23/53] pds_core: 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/amd/pds_core/main.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/amd/pds_core/main.c b/drivers/net/ethernet/amd/pds_core/main.c
index 660268ff9562..e2e49656c111 100644
--- a/drivers/net/ethernet/amd/pds_core/main.c
+++ b/drivers/net/ethernet/amd/pds_core/main.c
@@ -213,12 +213,9 @@ static const struct devlink_param pdsc_dl_params[] = {
pdsc_dl_enable_validate),
};
-#define PDSC_WQ_NAME_LEN 24
-
static int pdsc_init_pf(struct pdsc *pdsc)
{
struct devlink_health_reporter *hr;
- char wq_name[PDSC_WQ_NAME_LEN];
struct devlink *dl;
int err;
@@ -236,8 +233,8 @@ static int pdsc_init_pf(struct pdsc *pdsc)
goto err_out_release_regions;
/* General workqueue and timer, but don't start timer yet */
- snprintf(wq_name, sizeof(wq_name), "%s.%d", PDS_CORE_DRV_NAME, pdsc->uid);
- pdsc->wq = create_singlethread_workqueue(wq_name);
+ pdsc->wq = create_singlethread_workqueue2("%s.%d", PDS_CORE_DRV_NAME,
+ pdsc->uid);
INIT_WORK(&pdsc->health_work, pdsc_health_thread);
INIT_WORK(&pdsc->pci_reset_work, pdsc_pci_reset_thread);
timer_setup(&pdsc->wdtimer, pdsc_wdtimer_cb, 0);
Powered by blists - more mailing lists