Re: [PATCH v3 2/3] gianfar: Delete unnecessary variable initialisations in gfar_ethflow_to_filer_table()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: SF Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Jan 2016 12:34:33 +0100

>>> +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
>>> @@ -768,12 +768,12 @@ static void ethflow_to_filer_rules (struct gfar_private *priv, u64 ethflow)
>>>  static int gfar_ethflow_to_filer_table(struct gfar_private *priv, u64 ethflow,
>>>  				       u64 class)
>>>  {
>>> -	unsigned int last_rule_idx = priv->cur_filer_idx;
>>> +	unsigned int last_rule_idx;
>> 
>> This is a write only variable.  We can just remove it.
> 
> Can a static source code analysis tool like the software "http://smatch.sourceforge.net/";
> detect that such a variable is not read by this function implementation so far?

No, but a human can.

And a human should fully analyze any change he writes based upon static
analysis tool results.

I am going to be honest, and say that I am completely ignoring most of
your static checker patches.  You don't put enough care and consideration
into them, and I really don't have time to waste on looking at something
like that.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux