[PATCH 51/53] mac802154: Simplify the create*_workqueue() calls
From: Bart Van Assche
Date: Sun Jun 30 2024 - 18:41:02 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>
---
net/mac802154/main.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 9ab7396668d2..9da6b21eb3b5 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -193,19 +193,18 @@ static void ieee802154_setup_wpan_phy_pib(struct wpan_phy *wpan_phy)
int ieee802154_register_hw(struct ieee802154_hw *hw)
{
struct ieee802154_local *local = hw_to_local(hw);
- char mac_wq_name[IFNAMSIZ + 10] = {};
struct net_device *dev;
int rc = -ENOSYS;
local->workqueue =
- create_singlethread_workqueue(wpan_phy_name(local->phy));
+ create_singlethread_workqueue2("%s", wpan_phy_name(local->phy));
if (!local->workqueue) {
rc = -ENOMEM;
goto out;
}
- snprintf(mac_wq_name, IFNAMSIZ + 10, "%s-mac-cmds", wpan_phy_name(local->phy));
- local->mac_wq = create_singlethread_workqueue(mac_wq_name);
+ local->mac_wq = create_singlethread_workqueue2(
+ "%s-mac-cmds", wpan_phy_name(local->phy));
if (!local->mac_wq) {
rc = -ENOMEM;
goto out_wq;