Re: [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-14 Thread Markus Armbruster
Eduardo Habkost writes: > On Mon, Jun 13, 2016 at 01:29:47PM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > Use Coccinelle script to replace 'ret = E; return ret' with >> > 'return E'. The script will do the substitution only when

Re: [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-13 Thread Eduardo Habkost
On Mon, Jun 13, 2016 at 01:29:47PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > Use Coccinelle script to replace 'ret = E; return ret' with > > 'return E'. The script will do the substitution only when the > > function return type and variable type are the

Re: [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-13 Thread Markus Armbruster
Eduardo Habkost writes: > Use Coccinelle script to replace 'ret = E; return ret' with > 'return E'. The script will do the substitution only when the > function return type and variable type are the same. > > Sending as RFC because the patch looks more intrusive than the >

Re: [Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-10 Thread Eric Blake
On 06/10/2016 02:12 PM, Eduardo Habkost wrote: > Use Coccinelle script to replace 'ret = E; return ret' with > 'return E'. The script will do the substitution only when the > function return type and variable type are the same. > > Sending as RFC because the patch looks more intrusive than the >

[Qemu-devel] [RFC v2 3/3] Remove unnecessary variables for function return value

2016-06-10 Thread Eduardo Habkost
Use Coccinelle script to replace 'ret = E; return ret' with 'return E'. The script will do the substitution only when the function return type and variable type are the same. Sending as RFC because the patch looks more intrusive than the others. Probably better to split it per subsystem and let