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@xxxxxxxxx> > > --- > 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