usb: typec: tipd: remove unused tps6598x_write16,32 functions
Subsystems (2)
PATCH 1/1 usb: typec: tipd: remove unused tps6598x_write16,32 functions
clang with W=1 reportsdrivers/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
@@ -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
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 inttps6598x_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.
Signed-off-by Tom Rix <[email protected]>
Quoted 15 lines
--- drivers/usb/typec/tipd/core.c | 10 ---------- 1 file changed, 10 deletions(-)drivers/usb/typec/tipd/core.c +0
-3@@ -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
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 inttps6598x_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.
Signed-off-by Tom Rix <[email protected]>--- drivers/usb/typec/tipd/core.c | 10 ---------- 1 file changed, 10 deletions(-)