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]
Message-ID: <20240630222904.627462-50-bvanassche@acm.org>
Date: Sun, 30 Jun 2024 15:27:07 -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>,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
	"Christian A. Ehrhardt" <lk@...e.de>,
	Prashant Malani <pmalani@...omium.org>,
	Jameson Thies <jthies@...gle.com>,
	Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
Subject: [PATCH 49/53] usb: typec: ucsi: 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/usb/typec/ucsi/ucsi.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 2cc7aedd490f..2209f45c2b9a 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1504,15 +1504,10 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
 	enum typec_accessory *accessory = cap->accessory;
 	enum usb_role u_role = USB_ROLE_NONE;
 	u64 command;
-	char *name;
 	int ret;
 
-	name = kasprintf(GFP_KERNEL, "%s-con%d", dev_name(ucsi->dev), con->num);
-	if (!name)
-		return -ENOMEM;
-
-	con->wq = create_singlethread_workqueue(name);
-	kfree(name);
+	con->wq = create_singlethread_workqueue2("%s-con%d",
+						 dev_name(ucsi->dev), con->num);
 	if (!con->wq)
 		return -ENOMEM;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ