From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED98B34040C for ; Thu, 9 Jul 2026 02:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783565026; cv=none; b=Yu4yogZ3cTKtjMncCGZiIe7la9LoN9czjfMCu6QWNtsgatYV8737OdWh/AQF30hek9XkVSab8mQRrSMXdfKNe8pv+M4hGivCBO1xBHbxXkM+lp9z3C80RkSESilYR0KTtO3kYT4F7FLFTaVnDrisZmiQ+xy4cho7qfOhOfmQa7w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783565026; c=relaxed/simple; bh=q2OxhXoNoryQUJ7dcDSl9Zap0385aC8XUYBM510IMyc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=UUiBgwiEDXKUE4lL2T6o0vw61bMrBnLjLi/SRtQ4iKVLxhEkgJXZ3tZnNFqb5frgjjPH+uTbAlDFReYY1dTE1wCT5viyyotYwRr+ap5jSAAncU8Lp580ZpVJPvgO+MJ79g9ZoEUTvI4BSuQJmTPbxEiBXCZF8kmapTNlwPXQBhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Cp22cOOR; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Cp22cOOR" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-3811e59df58so894290a91.1 for ; Wed, 08 Jul 2026 19:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783565024; x=1784169824; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=gW0VHancYNE2HGZLJ9P1AKn89tN1JP9pInjIXieptlY=; b=Cp22cOORAI1XPbrYTjcS3DaikguFLT7jaQNMWs0XApRZviQcASgpx7763J4/Jq9eBw +VcNE/iGKLdivd+BD4ybvmiQnvJZZQSQizoF7OreJP8DFbdHDVV4AuadHqknpEm8egZg IdZET26Gq4peEpPyWgjUyViWAojX1ja5o40hsjjXGp4eAqO1ruhkN0pdriBbCFk4UBu6 3u18TyM6moyqw9nfG9loRLJGaa4m7wP5R2p6wmV+yxvtwMpM5H/wPNofgqL0ITdYsybv kvq+44RuENCuPgHI5UcYtduK+nlmaS65vCdxlsbR5tnCfGKzgucBOQl9NkoBsxRL9JDq hqRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783565024; x=1784169824; h=cc:to:message-id:content-transfer-encoding:content-type :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=gW0VHancYNE2HGZLJ9P1AKn89tN1JP9pInjIXieptlY=; b=UTuOpjnLdloePhpugiPyggjz2bSvRVBsE9e/+YLuB4/zvEqhunXmUQ+OawF9o4CNmE e+B3GPb1VZwvKGtpSSLgSSlXm40S+mkNrbpxBCk5lTK6wwYMzYCoRnuY+if+9Uabfouc EBD0Xk649x3vfJGQi8960ycb/2HgkW1CqGLBolS2RpZQS+Xo0e+wkG6S1fA2DD3teAsf jMXDHDjVz/NoAAKzKCYWga62rC7HaQZEOvsy36gMkYHhAGIN8PLibFQ8dddsuJ5xGNIN CTJwWeh2OHCAnYN5SnwYYjzCP4iieC49b+jwZOhR0OCAUl3GPevdpORtzAO2E5htcR0q wVgg== X-Forwarded-Encrypted: i=1; AHgh+Rrb7IIoDW8WmPlblEitKc7EwqtIqg3MD6S1jizuR7QiecCcJDQmfoZCXAVDnBvBh1fEWr3p6AtwNIFejpQ=@vger.kernel.org X-Gm-Message-State: AOJu0YySprhP6BE3IZcDfYuZAPeRQ10PZV9kzu8y4c0tH65Io49muD2i 4hVmQCdW0KLV51iMAssvDqapU+Iyl6ooEIMhyvrI17f9F9P66Zb55LH9CMT4BGcs X-Gm-Gg: AfdE7cli7yw7pka+KFTt4hsSnGJLGuunTKcKIbr9+H/3GqYhOimmB/SZt1sQqPQjPAB 0oiEQglaq8S2W2r8FeneZt+hGyq4BRpveboo63rGRXxzvgjjTYXCcL3tBS+g/0FmhkKCHYC/hPB NTT+jsusis+LiCE7WcwiaFLc9vft48Fbni9H9kT0LrOa7kdh0y4+r3ObQtoBieaRY8+ksVoypXK FePtuS6c2x9yj84WPI40fz3ou9xYSGU0KQ+RzBYZOewuhTW3RHjiFzTDdMOCFP2fb+uDgJDLOX7 k4MQZy1wIhjEe+wj54pC5wAlP2kxMmmfiZFHGKbd6Wp4J0OKiZ0dL7L60Y+e+zhlr+efwRk1SGT HstiFMD7AFVnPzJqIGFv2mHJJsnj45hKrNmq7U9FgqJ0lHFdpFoiL6wbMofdbXT3DCZglEpWLQd 0ZMZbVgd/o7wOIf4M= X-Received: by 2002:a17:90b:2f88:b0:36a:c4b:76cf with SMTP id 98e67ed59e1d1-38941acc562mr5664655a91.23.1783565024233; Wed, 08 Jul 2026 19:43:44 -0700 (PDT) Received: from [127.0.1.1] ([2404:f801:8028:1:7d69:9e2d:a142:ea02]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31174a5b26csm24556490eec.15.2026.07.08.19.43.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 19:43:43 -0700 (PDT) From: Subasri S Date: Thu, 09 Jul 2026 08:13:33 +0530 Subject: [PATCH] usb: typec: ucsi: Use %pe to print error pointers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260709-subasri-usb-ucsi-v1-v1-1-74bed201e489@gmail.com> X-B4-Tracking: v=1; b=H4sIANQKT2oC/x3MPQqAMAxA4atIZgOpin9XEYfWRs2i0tAiiHe3O H7Dew8oB2GFsXggcBKV88gwZQHLbo+NUXw2VFS11FGPGp3VIBjVYVxUMBmsG+956JhcayCXV+B V7v86ze/7AR70A3llAAAA To: Heikki Krogerus , Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Subasri S X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783565021; l=2219; i=subasris1210@gmail.com; s=20260709; h=from:subject:message-id; bh=q2OxhXoNoryQUJ7dcDSl9Zap0385aC8XUYBM510IMyc=; b=u8qr83ZOry/ErdFi5cV+JZboscaRLj7BePYlO9oZEtPvohcUMxYfeKyUMq8E2LXs+9QlzLyAc ZsxmIZfkmA+C2Az/Xeu6omTZ4SifGYU1iNXaqCYWEqfY2/q9NB1MfKk X-Developer-Key: i=subasris1210@gmail.com; a=ed25519; pk=6C4wavGFy/OsR8yQQKNWuDXoYPHp2L3sfgNfyzTruTk= Use the %pe format specifier instead of %ld with PTR_ERR() for printing error pointers in ucsi_register_plug(), ucsi_register_cable(), and ucsi_register_partner(). This prints symbolic error names (e.g. -ENOMEM) instead of errno numbers (e.g. -12), making debug logs more readable. This patch fixes coccinelle reported warnings: ./typec/ucsi/ucsi.c:1026:3-10: WARNING: Consider using %pe to print PTR_ERR() ./typec/ucsi/ucsi.c:1156:3-10: WARNING: Consider using %pe to print PTR_ERR() ./typec/ucsi/ucsi.c:967:3-10: WARNING: Consider using %pe to print PTR_ERR() Signed-off-by: Subasri S --- drivers/usb/typec/ucsi/ucsi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 92166a3725b1..bf896e5cefc3 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -963,8 +963,8 @@ static int ucsi_register_plug(struct ucsi_connector *con) plug = typec_register_plug(con->cable, &desc); if (IS_ERR(plug)) { dev_err(con->ucsi->dev, - "con%d: failed to register plug (%ld)\n", con->num, - PTR_ERR(plug)); + "con%d: failed to register plug (%pe)\n", con->num, + plug); return PTR_ERR(plug); } @@ -1022,8 +1022,8 @@ static int ucsi_register_cable(struct ucsi_connector *con) cable = typec_register_cable(con->port, &desc); if (IS_ERR(cable)) { dev_err(con->ucsi->dev, - "con%d: failed to register cable (%ld)\n", con->num, - PTR_ERR(cable)); + "con%d: failed to register cable (%pe)\n", con->num, + cable); return PTR_ERR(cable); } @@ -1152,8 +1152,8 @@ static int ucsi_register_partner(struct ucsi_connector *con) partner = typec_register_partner(con->port, &desc); if (IS_ERR(partner)) { dev_err(con->ucsi->dev, - "con%d: failed to register partner (%ld)\n", con->num, - PTR_ERR(partner)); + "con%d: failed to register partner (%pe)\n", con->num, + partner); return PTR_ERR(partner); } --- base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482 change-id: 20260708-subasri-usb-ucsi-v1-34dde97e0b61 Best regards, -- Subasri S