Skip to contentSkip to conversation

usb: typec: tipd: remove unused tps6598x_write16,32 functions

PATCH In review Tom Rix 3 participants 3 messages Mar 19, 2023 – Mar 21, 2023

Subsystems (2)
lore
Share & tools
lore

Tom Rix

author
#0 lore raw

PATCH 1/1 usb: typec: tipd: remove unused tps6598x_write16,32 functions

clang with W=1 reports
drivers/usb/typec/tipd/core.c:180:19: error: unused function
'tps6598x_write16' [-Werror,-Wunused-function]
static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val)

                  ^
drivers/usb/typec/tipd/core.c:185:19: error: unused function
  'tps6598x_write32' [-Werror,-Wunused-function]
static inline int tps6598x_write32(struct tps6598x *tps, u8 reg, u32 val)
                  ^

These static functions are not used, so remove them.

---
 drivers/usb/typec/tipd/core.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/usb/typec/tipd/core.c +0 -10
index 485b90c13078..af6ecb54b52c 100644
@@ -177,16 +177,6 @@ static inline int tps6598x_read64(struct tps6598x *tps, u8 reg, u64 *val)
 	return tps6598x_block_read(tps, reg, val, sizeof(u64));
 }
 
-static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val)
-{
-	return tps6598x_block_write(tps, reg, &val, sizeof(u16));
-}
-
-static inline int tps6598x_write32(struct tps6598x *tps, u8 reg, u32 val)
-{
-	return tps6598x_block_write(tps, reg, &val, sizeof(u32));
-}
-
 static inline int tps6598x_write64(struct tps6598x *tps, u8 reg, u64 val)
 {
 	return tps6598x_block_write(tps, reg, &val, sizeof(u64));
Signature · 1 line
2.27.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Tom Rix

clang with W=1 reports
drivers/usb/typec/tipd/core.c:180:19: error: unused function
'tps6598x_write16' [-Werror,-Wunused-function]
static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val)

Quoted 8 lines
                  ^
drivers/usb/typec/tipd/core.c:185:19: error: unused function
  'tps6598x_write32' [-Werror,-Wunused-function]
static inline int tps6598x_write32(struct tps6598x *tps, u8 reg, u32 val)
                  ^

These static functions are not used, so remove them.

Quoted 15 lines
---
 drivers/usb/typec/tipd/core.c | 10 ----------
 1 file changed, 10 deletions(-)
drivers/usb/typec/tipd/core.c +0 -3
index 485b90c13078..af6ecb54b52c 100644
@@ -177,16 +177,6 @@ static inline int tps6598x_read64(struct tps6598x *tps, u8 reg, u64 *val)
 	return tps6598x_block_read(tps, reg, val, sizeof(u64));
 }
 
-static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val)
-{
-	return tps6598x_block_write(tps, reg, &val, sizeof(u16));

drivers/usb/typec/tipd/core.c static inline int tps6598x_read64(struct tps6598x *tps, u8 reg, u64 *val) · line 182

Quoted 10 lines
drivers/usb/typec/tipd/core.c +0 -7
-}
-
-static inline int tps6598x_write32(struct tps6598x *tps, u8 reg, u32 val)
-{
-	return tps6598x_block_write(tps, reg, &val, sizeof(u32));
-}
-
 static inline int tps6598x_write64(struct tps6598x *tps, u8 reg, u64 val)
 {
 	return tps6598x_block_write(tps, reg, &val, sizeof(u64));

thanks,

Signature · 1 line
heikki
Reviewed-by on v1 1/1
#2 lore raw
In reply to Tom Rix
Quoted 10 lines · Tom Rix <[email protected]> 于2023年3月19日周日 21:37写道:

clang with W=1 reports
drivers/usb/typec/tipd/core.c:180:19: error: unused function
'tps6598x_write16' [-Werror,-Wunused-function]
static inline int tps6598x_write16(struct tps6598x *tps, u8 reg, u16 val)

                  ^
drivers/usb/typec/tipd/core.c:185:19: error: unused function
  'tps6598x_write32' [-Werror,-Wunused-function]
static inline int tps6598x_write32(struct tps6598x *tps, u8 reg, u32 val)
                  ^
Quoted 7 lines

These static functions are not used, so remove them.

---
 drivers/usb/typec/tipd/core.c | 10 ----------
 1 file changed, 10 deletions(-)