lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 30 Jun 2024 15:26:44 -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>,
	Horatiu Vultur <horatiu.vultur@...rochip.com>,
	UNGLinuxDriver@...rochip.com,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>,
	Paolo Abeni <pabeni@...hat.com>
Subject: [PATCH 26/53] net: lan966x: 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/microchip/lan966x/lan966x_ethtool.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c b/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
index 06811c60d598..69e6bb0cc44d 100644
--- a/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
+++ b/drivers/net/ethernet/microchip/lan966x/lan966x_ethtool.c
@@ -701,8 +701,6 @@ void lan966x_stats_get(struct net_device *dev,
 
 int lan966x_stats_init(struct lan966x *lan966x)
 {
-	char queue_name[32];
-
 	lan966x->stats_layout = lan966x_stats_layout;
 	lan966x->num_stats = ARRAY_SIZE(lan966x_stats_layout);
 	lan966x->stats = devm_kcalloc(lan966x->dev, lan966x->num_phys_ports *
@@ -713,9 +711,8 @@ int lan966x_stats_init(struct lan966x *lan966x)
 
 	/* Init stats worker */
 	mutex_init(&lan966x->stats_lock);
-	snprintf(queue_name, sizeof(queue_name), "%s-stats",
-		 dev_name(lan966x->dev));
-	lan966x->stats_queue = create_singlethread_workqueue(queue_name);
+	lan966x->stats_queue = create_singlethread_workqueue2(
+		"%s-stats", dev_name(lan966x->dev));
 	if (!lan966x->stats_queue)
 		return -ENOMEM;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ