lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21hryj+b3wm8JNGW8V9gpF11D6AjdEmhq0FAdunQkPQFFcw@mail.gmail.com>
Date:   Fri, 8 May 2020 16:00:31 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Samuel Zou <zou_wei@...wei.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        lkml <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH -next] net: dsa: sja1105: remove set but not used variable 'prev_time'

Hi Samuel,

On Fri, 8 May 2020 at 14:55, Samuel Zou <zou_wei@...wei.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@...wei.com>
> Signed-off-by: Samuel Zou <zou_wei@...wei.com>
> ---

Thank you for the patch!

Reviewed-by: Vladimir Oltean <vladimir.oltean@....com>
Tested-by: Vladimir Oltean <vladimir.oltean@....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
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ