mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Li Heng <liheng40@huawei.com>, heikki.krogerus@linux.intel.com
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] usb: typec: Remove set but not used variable
Date: Thu, 24 Sep 2020 07:33:59 -0700	[thread overview]
Message-ID: <fe671faa-9975-be20-22f5-31a97e3c8859@roeck-us.net> (raw)
In-Reply-To: <1600956767-10427-1-git-send-email-liheng40@huawei.com>

On 9/24/20 7:12 AM, Li Heng wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/usb/typec/tcpm/tcpm.c:1620:39: warning:
> ‘tcpm_altmode_ops’ defined but not used [-Wunused-const-variable=]
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Li Heng <liheng40@huawei.com>

I thought there was a patch series underway which started using it,
but maybe my memory defeats me. Either case, it doesn't make much sense
to remove the ops variable without removing the associated functions
as well.

Guenter

> ---
>  drivers/usb/typec/tcpm/tcpm.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
> index 9280654..1542eaa 100644
> --- a/drivers/usb/typec/tcpm/tcpm.c
> +++ b/drivers/usb/typec/tcpm/tcpm.c
> @@ -1617,12 +1617,6 @@ static int tcpm_altmode_vdm(struct typec_altmode *altmode,
>  	return 0;
>  }
> 
> -static const struct typec_altmode_ops tcpm_altmode_ops = {
> -	.enter = tcpm_altmode_enter,
> -	.exit = tcpm_altmode_exit,
> -	.vdm = tcpm_altmode_vdm,
> -};
> -
>  /*
>   * PD (data, control) command handling functions
>   */
> --
> 2.7.4
> 



  reply	other threads:[~2020-09-24 14:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 14:12 Li Heng
2020-09-24 14:33 ` Guenter Roeck [this message]
2020-09-25 12:21   ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe671faa-9975-be20-22f5-31a97e3c8859@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=liheng40@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®