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 <[email protected]>
> 
> ---
>  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.

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to