Re: [Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessary variable

2015-10-03 Thread Michael Tokarev
25.09.2015 11:37, Shraddha Barke wrote: > Compress lines and remove the variable. Applied to -trivial, removing this piece of commit message: --- > Change made using Coccinelle script > > @@ > expression ret; > @@ > - if (ret) return ret; > - return 0; > + return ret; > @@ > local idexpression r

Re: [Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessary variable

2015-09-28 Thread Paolo Bonzini
On 26/09/2015 18:15, Eric Blake wrote: > On 09/25/2015 02:37 AM, Shraddha Barke wrote: >> Compress lines and remove the variable. >> > >> +++ b/target-ppc/kvm.c >> @@ -1782,8 +1782,7 @@ uint32_t kvmppc_get_tbfreq(void) >> >> ns++; >> >> -retval = atoi(ns); >> -return retval; >>

Re: [Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessary variable

2015-09-26 Thread Eric Blake
On 09/25/2015 02:37 AM, Shraddha Barke wrote: > Compress lines and remove the variable. > > +++ b/target-ppc/kvm.c > @@ -1782,8 +1782,7 @@ uint32_t kvmppc_get_tbfreq(void) > > ns++; > > -retval = atoi(ns); > -return retval; > +return atoi(ns); atoi() is lousy; it cannot prop

[Qemu-devel] [PATCH 3/3] Target-ppc: Remove unnecessary variable

2015-09-25 Thread Shraddha Barke
Compress lines and remove the variable. Change made using Coccinelle script @@ expression ret; @@ - if (ret) return ret; - return 0; + return ret; @@ local idexpression ret; expression e; @@ - ret = e; - return ret; + return e; @@ type T; identifier i; @@ - T i; ... when != i Signed-off-by: Shra