[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1401671508.19767.11.camel@jtkirshe-mobl>
Date: Sun, 01 Jun 2014 18:11:48 -0700
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
To: Peter Senna Tschudin <peter.senna@...il.com>
Cc: kernel-janitors@...r.kernel.org,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Bruce Allan <bruce.w.allan@...el.com>,
Carolyn Wyborny <carolyn.wyborny@...el.com>,
Don Skidmore <donald.c.skidmore@...el.com>,
Greg Rose <gregory.v.rose@...el.com>,
Alex Duyck <alexander.h.duyck@...el.com>,
John Ronciak <john.ronciak@...el.com>,
Mitch Williams <mitch.a.williams@...el.com>,
Linux NICS <linux.nics@...el.com>,
e1000-devel@...ts.sourceforge.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 11/11] drivers/net/ethernet/intel: Remove useless return
variables
On Sat, 2014-05-31 at 10:14 -0300, Peter Senna Tschudin wrote:
> This patch remove variables that are initialized with a constant,
> are never updated, and are only used as parameter of return.
> Return the constant instead of using a variable.
>
> Verified by compilation only.
>
> The coccinelle script that find and fixes this issue is:
> // <smpl>
> @@
> type T;
> constant C;
> identifier ret;
> @@
> - T ret = C;
> ... when != ret
> when strict
> return
> - ret
> + C
> ;
> // </smpl>
>
> Signed-off-by: Peter Senna Tschudin <peter.senna@...il.com>
>
> ---
> drivers/net/ethernet/intel/i40e/i40e_adminq.c | 12 +++---------
> drivers/net/ethernet/intel/i40evf/i40e_adminq.c | 12 +++---------
> drivers/net/ethernet/intel/igb/e1000_82575.c | 22
> ++++++++--------------
> 3 files changed, 14 insertions(+), 32 deletions(-)
I have added this patch to my queue, thanks.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists