linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][usb-next] USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name
@ 2018-08-06 11:14 Colin King
  2018-08-06 12:11 ` Heikki Krogerus
  2018-08-06 15:47 ` Guenter Roeck
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-08-06 11:14 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, Guenter Roeck, linux-usb
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Variables snk_pdo and toggling_mode_name are defined but are not used and
hence can be removed.

Cleans up clang warnings:
warning: 'snk_pdo' defined but not used [-Wunused-const-variable=]
warning: 'toggling_mode_name' defined but not used [-Wunused-const-variable=]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/typec/fusb302/fusb302.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c
index 82bed9810be6..ad7cfed1cea7 100644
--- a/drivers/usb/typec/fusb302/fusb302.c
+++ b/drivers/usb/typec/fusb302/fusb302.c
@@ -48,13 +48,6 @@ enum toggling_mode {
 	TOGGLING_MODE_SRC,
 };
 
-static const char * const toggling_mode_name[] = {
-	[TOGGLINE_MODE_OFF]	= "toggling_OFF",
-	[TOGGLING_MODE_DRP]	= "toggling_DRP",
-	[TOGGLING_MODE_SNK]	= "toggling_SNK",
-	[TOGGLING_MODE_SRC]	= "toggling_SRC",
-};
-
 enum src_current_status {
 	SRC_CURRENT_DEFAULT,
 	SRC_CURRENT_MEDIUM,
@@ -1178,10 +1171,6 @@ static const u32 src_pdo[] = {
 	PDO_FIXED(5000, 400, PDO_FIXED_FLAGS),
 };
 
-static const u32 snk_pdo[] = {
-	PDO_FIXED(5000, 400, PDO_FIXED_FLAGS),
-};
-
 static const struct tcpc_config fusb302_tcpc_config = {
 	.src_pdo = src_pdo,
 	.nr_src_pdo = ARRAY_SIZE(src_pdo),
-- 
2.17.1


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

* Re: [PATCH][usb-next] USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name
  2018-08-06 11:14 [PATCH][usb-next] USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name Colin King
@ 2018-08-06 12:11 ` Heikki Krogerus
  2018-08-06 15:47 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Heikki Krogerus @ 2018-08-06 12:11 UTC (permalink / raw)
  To: Colin King
  Cc: Greg Kroah-Hartman, Guenter Roeck, linux-usb, kernel-janitors,
	linux-kernel

On Mon, Aug 06, 2018 at 12:14:14PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variables snk_pdo and toggling_mode_name are defined but are not used and
> hence can be removed.
> 
> Cleans up clang warnings:
> warning: 'snk_pdo' defined but not used [-Wunused-const-variable=]
> warning: 'toggling_mode_name' defined but not used [-Wunused-const-variable=]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

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

> ---
>  drivers/usb/typec/fusb302/fusb302.c | 11 -----------
>  1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c
> index 82bed9810be6..ad7cfed1cea7 100644
> --- a/drivers/usb/typec/fusb302/fusb302.c
> +++ b/drivers/usb/typec/fusb302/fusb302.c
> @@ -48,13 +48,6 @@ enum toggling_mode {
>  	TOGGLING_MODE_SRC,
>  };
>  
> -static const char * const toggling_mode_name[] = {
> -	[TOGGLINE_MODE_OFF]	= "toggling_OFF",
> -	[TOGGLING_MODE_DRP]	= "toggling_DRP",
> -	[TOGGLING_MODE_SNK]	= "toggling_SNK",
> -	[TOGGLING_MODE_SRC]	= "toggling_SRC",
> -};
> -
>  enum src_current_status {
>  	SRC_CURRENT_DEFAULT,
>  	SRC_CURRENT_MEDIUM,
> @@ -1178,10 +1171,6 @@ static const u32 src_pdo[] = {
>  	PDO_FIXED(5000, 400, PDO_FIXED_FLAGS),
>  };
>  
> -static const u32 snk_pdo[] = {
> -	PDO_FIXED(5000, 400, PDO_FIXED_FLAGS),
> -};
> -
>  static const struct tcpc_config fusb302_tcpc_config = {
>  	.src_pdo = src_pdo,
>  	.nr_src_pdo = ARRAY_SIZE(src_pdo),

Thanks,

-- 
heikki

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

* Re: [PATCH][usb-next] USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name
  2018-08-06 11:14 [PATCH][usb-next] USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name Colin King
  2018-08-06 12:11 ` Heikki Krogerus
@ 2018-08-06 15:47 ` Guenter Roeck
  1 sibling, 0 replies; 3+ messages in thread
From: Guenter Roeck @ 2018-08-06 15:47 UTC (permalink / raw)
  To: Colin King, Heikki Krogerus, Greg Kroah-Hartman, linux-usb
  Cc: kernel-janitors, linux-kernel

On 08/06/2018 04:14 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variables snk_pdo and toggling_mode_name are defined but are not used and
> hence can be removed.
> 
> Cleans up clang warnings:
> warning: 'snk_pdo' defined but not used [-Wunused-const-variable=]
> warning: 'toggling_mode_name' defined but not used [-Wunused-const-variable=]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/usb/typec/fusb302/fusb302.c | 11 -----------
>   1 file changed, 11 deletions(-)
> 
> diff --git a/drivers/usb/typec/fusb302/fusb302.c b/drivers/usb/typec/fusb302/fusb302.c
> index 82bed9810be6..ad7cfed1cea7 100644
> --- a/drivers/usb/typec/fusb302/fusb302.c
> +++ b/drivers/usb/typec/fusb302/fusb302.c
> @@ -48,13 +48,6 @@ enum toggling_mode {
>   	TOGGLING_MODE_SRC,
>   };
>   
> -static const char * const toggling_mode_name[] = {
> -	[TOGGLINE_MODE_OFF]	= "toggling_OFF",
> -	[TOGGLING_MODE_DRP]	= "toggling_DRP",
> -	[TOGGLING_MODE_SNK]	= "toggling_SNK",
> -	[TOGGLING_MODE_SRC]	= "toggling_SRC",
> -};
> -
>   enum src_current_status {
>   	SRC_CURRENT_DEFAULT,
>   	SRC_CURRENT_MEDIUM,
> @@ -1178,10 +1171,6 @@ static const u32 src_pdo[] = {
>   	PDO_FIXED(5000, 400, PDO_FIXED_FLAGS),
>   };
>   
> -static const u32 snk_pdo[] = {
> -	PDO_FIXED(5000, 400, PDO_FIXED_FLAGS),
> -};
> -
>   static const struct tcpc_config fusb302_tcpc_config = {
>   	.src_pdo = src_pdo,
>   	.nr_src_pdo = ARRAY_SIZE(src_pdo),
> 


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

end of thread, other threads:[~2018-08-06 15:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06 11:14 [PATCH][usb-next] USB: typec: fsusb302: remove unused variables snk_pdo and toggling_mode_name Colin King
2018-08-06 12:11 ` Heikki Krogerus
2018-08-06 15:47 ` Guenter Roeck

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).