From nobody Fri Dec 19 07:15:48 2025 Received: from 009.lax.mailroute.net (009.lax.mailroute.net [199.89.1.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BCABA1527BB for ; Sun, 30 Jun 2024 22:32:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.12 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719786775; cv=none; b=rO54jVffEfwGpURETp6qUVCJPnyBnLnK9zoV/DsL+AeGnyO8M/uYaKWZXVLsicGW/MnYvcjb2fmWVhm8JiTp6irdguq0BLQ/W+FZxvWqQrxYSiN7xgVCB5BStUB81HfxmM6k2wDzKIa14k0KdVi/0P366Gbmr/5/V6/08lDM7Uk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719786775; c=relaxed/simple; bh=GQtamdc865dWGQq43UxMEnK6DMqDUf4s9VSg+IZzUd8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oEx+CmVRhQ/dYNFVthxIug1ZWbRFA+cFXl3L/wkTBkW6GagQe/QoK1mQIjp7/+NCTCBwM1Ursf/hDJwjuwwkdoEW29BUA7VAoQVq3r0sYFpY1A8IHUYXUS2FTNEB7swUC0YZwpcpD0BWSCBFbQM6FSWj1UiLvjFptr7tW+vpnkc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=saepFWW8; arc=none smtp.client-ip=199.89.1.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="saepFWW8" Received: from localhost (localhost [127.0.0.1]) by 009.lax.mailroute.net (Postfix) with ESMTP id 4WC3pY2Hclzll9fM; Sun, 30 Jun 2024 22:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:mime-version:references:in-reply-to :x-mailer:message-id:date:date:subject:subject:from:from :received:received; s=mr01; t=1719786770; x=1722378771; bh=mq3SJ L+opWIPTpSEvvg4HW9BnuQCBIk2w44ZKHA9fVo=; b=saepFWW84znIFUQZrY7Im 4m+l2u8f4Hvec0TbA/kUwk+T2h0t97FTwI9D6bRtM4ya764qt+ruVUl1P+73GIzn wuCrVgyEcJ5KcQCySpHqNzuNivDJzjsOFAdKtQA7tRw8fRbVFvqRmhLab7UgcAoz f1skEPnCkmVpBBzFYQ9DsWsrpAxqrWxyRze+CyPAVE44hfsRoTYgOPzStmkJrgsX 3IXnA5yXJkghRJkDmnLJ0w8lsS5w55YwyBNIj8CxXNnKueG/2PGRblX8WwUT/q9W lzYWDehE0/dCkrAEPLAx9DddETzln97XwjZnemO7eP27w0oyWg/XL4TGMOTlRAKT w== X-Virus-Scanned: by MailRoute Received: from 009.lax.mailroute.net ([127.0.0.1]) by localhost (009.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id A_XAnG5OdfXD; Sun, 30 Jun 2024 22:32:50 +0000 (UTC) Received: from bvanassche-glaptop2.roam.corp.google.com (c-73-231-117-72.hsd1.ca.comcast.net [73.231.117.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 009.lax.mailroute.net (Postfix) with ESMTPSA id 4WC3pQ4Kdhzll9fH; Sun, 30 Jun 2024 22:32:46 +0000 (UTC) From: Bart Van Assche To: Tejun Heo Cc: Lai Jiangshan , "Martin K . Petersen" , linux-kernel@vger.kernel.org, Bart Van Assche , Heikki Krogerus , Greg Kroah-Hartman , Dmitry Baryshkov , "Christian A. Ehrhardt" , Prashant Malani , Jameson Thies , Abhishek Pandit-Subedi Subject: [PATCH 49/53] usb: typec: ucsi: Simplify a create*_workqueue() call Date: Sun, 30 Jun 2024 15:27:07 -0700 Message-ID: <20240630222904.627462-50-bvanassche@acm.org> X-Mailer: git-send-email 2.45.2.803.g4e1b14247a-goog In-Reply-To: <20240630222904.627462-1-bvanassche@acm.org> References: <20240630222904.627462-1-bvanassche@acm.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Pass a format string to create*_workqueue2() instead of formatting the workqueue name before create*_workqueue() is called. Signed-off-by: Bart Van Assche --- 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, st= ruct ucsi_connector *con) enum typec_accessory *accessory =3D cap->accessory; enum usb_role u_role =3D USB_ROLE_NONE; u64 command; - char *name; int ret; =20 - name =3D kasprintf(GFP_KERNEL, "%s-con%d", dev_name(ucsi->dev), con->num); - if (!name) - return -ENOMEM; - - con->wq =3D create_singlethread_workqueue(name); - kfree(name); + con->wq =3D create_singlethread_workqueue2("%s-con%d", + dev_name(ucsi->dev), con->num); if (!con->wq) return -ENOMEM; =20