Skip to contentSkip to conversation

usb: typec: Remove unused ucsi_cci_str

PATCH In review [email protected] 2 participants 2 messages Jun 9, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: typec: Remove unused ucsi_cci_str

From: "Dr. David Alan Gilbert" <[email protected]>

ucsi_cci_str() last use was removed in 2019 by commit 2ede55468ca8 ("usb: typec: ucsi: Remove the old API")

Remove it.

---
 drivers/usb/typec/ucsi/trace.c | 17 -----------------
 drivers/usb/typec/ucsi/trace.h |  1 -
 2 files changed, 18 deletions(-)
drivers/usb/typec/ucsi/trace.c +0 -17
index 596a9542d401..13a38422743a 100644
@@ -33,23 +33,6 @@ const char *ucsi_cmd_str(u64 raw_cmd)
 	return ucsi_cmd_strs[(cmd >= ARRAY_SIZE(ucsi_cmd_strs)) ? 0 : cmd];
 }
 
-const char *ucsi_cci_str(u32 cci)
-{
-	if (UCSI_CCI_CONNECTOR(cci)) {
-		if (cci & UCSI_CCI_ACK_COMPLETE)
-			return "Event pending (ACK completed)";
-		if (cci & UCSI_CCI_COMMAND_COMPLETE)
-			return "Event pending (command completed)";
-		return "Connector Change";
-	}
-	if (cci & UCSI_CCI_ACK_COMPLETE)
-		return "ACK completed";
-	if (cci & UCSI_CCI_COMMAND_COMPLETE)
-		return "Command completed";
-
-	return "";
-}
-
 static const char * const ucsi_recipient_strs[] = {
 	[UCSI_RECIPIENT_CON]		= "port",
 	[UCSI_RECIPIENT_SOP]		= "partner",
drivers/usb/typec/ucsi/trace.h +0 -1
index 41701dee7056..9554a0207276 100644
@@ -10,7 +10,6 @@
 #include <linux/usb/typec_altmode.h>
 
 const char *ucsi_cmd_str(u64 raw_cmd);
-const char *ucsi_cci_str(u32 cci);
 const char *ucsi_recipient_str(u8 recipient);
 
 DECLARE_EVENT_CLASS(ucsi_log_command,
Signature · 1 line
2.49.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · On Mon, Jun 09, 2025 at 01:43:19AM +0100, [email protected] wrote:

From: "Dr. David Alan Gilbert" <[email protected]>

ucsi_cci_str() last use was removed in 2019 by commit 2ede55468ca8 ("usb: typec: ucsi: Remove the old API")

Remove it.

Quoted 47 lines
---
 drivers/usb/typec/ucsi/trace.c | 17 -----------------
 drivers/usb/typec/ucsi/trace.h |  1 -
 2 files changed, 18 deletions(-)
drivers/usb/typec/ucsi/trace.c +0 -17
index 596a9542d401..13a38422743a 100644
@@ -33,23 +33,6 @@ const char *ucsi_cmd_str(u64 raw_cmd)
 	return ucsi_cmd_strs[(cmd >= ARRAY_SIZE(ucsi_cmd_strs)) ? 0 : cmd];
 }
 
-const char *ucsi_cci_str(u32 cci)
-{
-	if (UCSI_CCI_CONNECTOR(cci)) {
-		if (cci & UCSI_CCI_ACK_COMPLETE)
-			return "Event pending (ACK completed)";
-		if (cci & UCSI_CCI_COMMAND_COMPLETE)
-			return "Event pending (command completed)";
-		return "Connector Change";
-	}
-	if (cci & UCSI_CCI_ACK_COMPLETE)
-		return "ACK completed";
-	if (cci & UCSI_CCI_COMMAND_COMPLETE)
-		return "Command completed";
-
-	return "";
-}
-
 static const char * const ucsi_recipient_strs[] = {
 	[UCSI_RECIPIENT_CON]		= "port",
 	[UCSI_RECIPIENT_SOP]		= "partner",
drivers/usb/typec/ucsi/trace.h +0 -1
index 41701dee7056..9554a0207276 100644
@@ -10,7 +10,6 @@
 #include <linux/usb/typec_altmode.h>
 
 const char *ucsi_cmd_str(u64 raw_cmd);
-const char *ucsi_cci_str(u32 cci);
 const char *ucsi_recipient_str(u8 recipient);
 
 DECLARE_EVENT_CLASS(ucsi_log_command,
Signature · 1 line
2.49.0
Signature · 1 line
heikki