[PATCH 24/53] net: bna: Simplify a create*_workqueue() call

From: Bart Van Assche
Date: Sun Jun 30 2024 - 18:35:14 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/brocade/bna/bnad.c | 4 ++--
drivers/net/ethernet/brocade/bna/bnad.h | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index fe121d36112d..7d482e8b0949 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -3488,8 +3488,8 @@ bnad_init(struct bnad *bnad,
bnad->tx_coalescing_timeo = BFI_TX_COALESCING_TIMEO;
bnad->rx_coalescing_timeo = BFI_RX_COALESCING_TIMEO;

- sprintf(bnad->wq_name, "%s_wq_%d", BNAD_NAME, bnad->id);
- bnad->work_q = create_singlethread_workqueue(bnad->wq_name);
+ bnad->work_q =
+ create_singlethread_workqueue2("%s_wq_%d", BNAD_NAME, bnad->id);
if (!bnad->work_q) {
iounmap(bnad->bar0);
return -ENOMEM;
diff --git a/drivers/net/ethernet/brocade/bna/bnad.h b/drivers/net/ethernet/brocade/bna/bnad.h
index 10b1e534030e..0d70b1df1793 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.h
+++ b/drivers/net/ethernet/brocade/bna/bnad.h
@@ -346,7 +346,6 @@ struct bnad {
char adapter_name[BNAD_NAME_LEN];
char port_name[BNAD_NAME_LEN];
char mbox_irq_name[BNAD_NAME_LEN];
- char wq_name[BNAD_NAME_LEN];

/* debugfs specific data */
char *regdata;