lkml.org 
[lkml]   [2017]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: isp1760: compress return logic into one line
From
Date
Am Montag, den 10.07.2017, 14:58 -0500 schrieb  Gustavo A. R. Silva :
> Hi Oliver,
>
> Quoting Oliver Neukum <oneukum@suse.com>:
>
> >
> > Am Sonntag, den 09.07.2017, 21:00 -0500 schrieb Gustavo A. R. Silva :
> > >
> > > Simplify return logic to avoid unnecessary variable assignment.
> > >
> > > This issue was detected using Coccinelle and the following
> > > semantic patch:
> > >
> >
> > Hi,
> >
> > I need to ask: Where is the improvement? The compiler does not bother
> > and for the human reader you do not do anything obvious and you
> > decreased grepability.
> >
>
> The declaration of local variable _retval_ was removed also.
> So both, variable declaration and assignment removal are the improvements.

Yeah, but a variable called "retval" has an extremely clear function.
Simplifying code is an improvement. Making it clearer is an
improvement.
I am sorry but the proposed change is almost like removing blank lines
to make it more compact

> Regarding the greability, I think that depends on the context.

"retval" has a clear function and is unique.

Regards
Oliver

\
 
 \ /
  Last update: 2017-07-11 10:13    [W:0.086 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site