All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Samuel Zou <zou_wei@huawei.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	lkml <linux-kernel@vger.kernel.org>,
	netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH -next] net: dsa: sja1105: remove set but not used variable 'prev_time'
Date: Fri, 8 May 2020 16:00:31 +0300	[thread overview]
Message-ID: <CA+h21hryj+b3wm8JNGW8V9gpF11D6AjdEmhq0FAdunQkPQFFcw@mail.gmail.com> (raw)
In-Reply-To: <1588939255-58038-1-git-send-email-zou_wei@huawei.com>

Hi Samuel,

On Fri, 8 May 2020 at 14:55, Samuel Zou <zou_wei@huawei.com> wrote:
>
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/dsa/sja1105/sja1105_vl.c:468:6: warning: variable ‘prev_time’ set but not used [-Wunused-but-set-variable]
>   u32 prev_time = 0;
>       ^~~~~~~~~
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Samuel Zou <zou_wei@huawei.com>
> ---

Thank you for the patch!

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>

>  drivers/net/dsa/sja1105/sja1105_vl.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_vl.c b/drivers/net/dsa/sja1105/sja1105_vl.c
> index b52f1af..aa9b0b9 100644
> --- a/drivers/net/dsa/sja1105/sja1105_vl.c
> +++ b/drivers/net/dsa/sja1105/sja1105_vl.c
> @@ -465,7 +465,6 @@ sja1105_gating_cfg_time_to_interval(struct sja1105_gating_config *gating_cfg,
>         struct sja1105_gate_entry *last_e;
>         struct sja1105_gate_entry *e;
>         struct list_head *prev;
> -       u32 prev_time = 0;
>
>         list_for_each_entry(e, &gating_cfg->entries, list) {
>                 struct sja1105_gate_entry *p;
> @@ -476,7 +475,6 @@ sja1105_gating_cfg_time_to_interval(struct sja1105_gating_config *gating_cfg,
>                         continue;
>
>                 p = list_entry(prev, struct sja1105_gate_entry, list);
> -               prev_time = e->interval;
>                 p->interval = e->interval - p->interval;
>         }
>         last_e = list_last_entry(&gating_cfg->entries,
> --
> 2.6.2
>

  reply	other threads:[~2020-05-08 13:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 12:00 [PATCH -next] net: dsa: sja1105: remove set but not used variable 'prev_time' Samuel Zou
2020-05-08 13:00 ` Vladimir Oltean [this message]
2020-05-09  5:32 ` Jakub Kicinski

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=CA+h21hryj+b3wm8JNGW8V9gpF11D6AjdEmhq0FAdunQkPQFFcw@mail.gmail.com \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=vivien.didelot@gmail.com \
    --cc=zou_wei@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.