linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: typec: tipd: remove unused tps6598x_write16,32 functions
@ 2023-03-19 13:37 Tom Rix
  2023-03-20 11:58 ` Heikki Krogerus
  2023-03-21  7:05 ` Jun Nie
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Rix @ 2023-03-19 13:37 UTC (permalink / raw)
  To: heikki.krogerus, gregkh, nathan, ndesaulniers, sven, agx,
	Jonathan.Cameron, jun.nie, u.kleine-koenig
  Cc: linux-usb, linux-kernel, llvm, 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)
                  ^
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 <trix@redhat.com>
---
 drivers/usb/typec/tipd/core.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
index 485b90c13078..af6ecb54b52c 100644
--- a/drivers/usb/typec/tipd/core.c
+++ b/drivers/usb/typec/tipd/core.c
@@ -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));
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: typec: tipd: remove unused tps6598x_write16,32 functions
  2023-03-19 13:37 [PATCH] usb: typec: tipd: remove unused tps6598x_write16,32 functions Tom Rix
@ 2023-03-20 11:58 ` Heikki Krogerus
  2023-03-21  7:05 ` Jun Nie
  1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2023-03-20 11:58 UTC (permalink / raw)
  To: Tom Rix
  Cc: gregkh, nathan, ndesaulniers, sven, agx, Jonathan.Cameron,
	jun.nie, u.kleine-koenig, linux-usb, linux-kernel, llvm

On Sun, Mar 19, 2023 at 09:37:32AM -0400, Tom Rix wrote:
> 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.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/tipd/core.c | 10 ----------
>  1 file changed, 10 deletions(-)
> 
> diff --git a/drivers/usb/typec/tipd/core.c b/drivers/usb/typec/tipd/core.c
> index 485b90c13078..af6ecb54b52c 100644
> --- a/drivers/usb/typec/tipd/core.c
> +++ b/drivers/usb/typec/tipd/core.c
> @@ -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));

thanks,

-- 
heikki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] usb: typec: tipd: remove unused tps6598x_write16,32 functions
  2023-03-19 13:37 [PATCH] usb: typec: tipd: remove unused tps6598x_write16,32 functions Tom Rix
  2023-03-20 11:58 ` Heikki Krogerus
@ 2023-03-21  7:05 ` Jun Nie
  1 sibling, 0 replies; 3+ messages in thread
From: Jun Nie @ 2023-03-21  7:05 UTC (permalink / raw)
  To: Tom Rix
  Cc: heikki.krogerus, gregkh, nathan, ndesaulniers, sven, agx,
	Jonathan.Cameron, u.kleine-koenig, linux-usb, linux-kernel, llvm

Tom Rix <trix@redhat.com> 于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)
>                   ^
> These static functions are not used, so remove them.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
> ---
>  drivers/usb/typec/tipd/core.c | 10 ----------
>  1 file changed, 10 deletions(-)
>
Reviewed-by: Jun Nie <jun.nie@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-21  7:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-19 13:37 [PATCH] usb: typec: tipd: remove unused tps6598x_write16,32 functions Tom Rix
2023-03-20 11:58 ` Heikki Krogerus
2023-03-21  7:05 ` Jun Nie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).