From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754543AbcAOQm6 (ORCPT ); Fri, 15 Jan 2016 11:42:58 -0500 Received: from shards.monkeyblade.net ([149.20.54.216]:59257 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218AbcAOQm4 (ORCPT ); Fri, 15 Jan 2016 11:42:56 -0500 Date: Fri, 15 Jan 2016 11:42:53 -0500 (EST) Message-Id: <20160115.114253.673366436532953675.davem@davemloft.net> To: elfring@users.sourceforge.net Cc: dan.carpenter@oracle.com, netdev@vger.kernel.org, claudiu.manoil@freescale.com, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, julia.lawall@lip6.fr Subject: Re: [PATCH v3 2/3] gianfar: Delete unnecessary variable initialisations in gfar_ethflow_to_filer_table() From: David Miller In-Reply-To: <5698D949.6000404@users.sourceforge.net> References: <5698C61A.90504@users.sourceforge.net> <20160115102947.GI4764@mwanda> <5698D949.6000404@users.sourceforge.net> X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Fri, 15 Jan 2016 08:42:56 -0800 (PST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SF Markus Elfring 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.