Skip to contentSkip to conversation

usb: typec: tcpci_mt6360: remove unused mt6360_tcpc_read16 function

PATCH In review Tom Rix 2 participants 2 messages Mar 19, 2023 – Mar 20, 2023

Subsystems (3)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 usb: typec: tcpci_mt6360: remove unused mt6360_tcpc_read16 function

clang with W=1 reports drivers/usb/typec/tcpm/tcpci_mt6360.c:46:19: error: unused function
'mt6360_tcpc_read16' [-Werror,-Wunused-function]
static inline int mt6360_tcpc_read16(struct regmap *regmap,

                  ^

This function is not used, so remove it.

---
 drivers/usb/typec/tcpm/tcpci_mt6360.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/usb/typec/tcpm/tcpci_mt6360.c +0 -6
index 1b7c31278ebb..6fa8fd5c8041 100644
@@ -43,12 +43,6 @@ struct mt6360_tcpc_info {
 	int irq;
 };
 
-static inline int mt6360_tcpc_read16(struct regmap *regmap,
-				     unsigned int reg, u16 *val)
-{
-	return regmap_raw_read(regmap, reg, val, sizeof(u16));
-}
-
 static inline int mt6360_tcpc_write16(struct regmap *regmap,
 				      unsigned int reg, u16 val)
 {
Signature · 1 line
2.27.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Tom Rix

clang with W=1 reports drivers/usb/typec/tcpm/tcpci_mt6360.c:46:19: error: unused function
'mt6360_tcpc_read16' [-Werror,-Wunused-function]
static inline int mt6360_tcpc_read16(struct regmap *regmap,

                  ^

This function is not used, so remove it.

Quoted 23 lines
---
 drivers/usb/typec/tcpm/tcpci_mt6360.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/usb/typec/tcpm/tcpci_mt6360.c +0 -6
index 1b7c31278ebb..6fa8fd5c8041 100644
@@ -43,12 +43,6 @@ struct mt6360_tcpc_info {
 	int irq;
 };
 
-static inline int mt6360_tcpc_read16(struct regmap *regmap,
-				     unsigned int reg, u16 *val)
-{
-	return regmap_raw_read(regmap, reg, val, sizeof(u16));
-}
-
 static inline int mt6360_tcpc_write16(struct regmap *regmap,
 				      unsigned int reg, u16 val)
 {
Signature · 1 line
2.27.0
Signature · 1 line
heikki