lkml.org 
[lkml]   [2009]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectFwd: [PATCH] Removed useless retval variables in usb-serial.c
From
Forgot to CC the mailing list as well on this one.

Sorry,

Trevor Pace




---------- Forwarded message ----------
From: Trevor Pace <trevorpace@gmail.com>
Date: Fri, Jul 24, 2009 at 2:47 PM
Subject: Re: [PATCH] Removed useless retval variables in usb-serial.c
To: Greg KH <gregkh@suse.de>


Hey Greg,

First off, thanks for the feedback. As you can probably tell I haven't
done much kernel patching before.

Perhaps "useless" wasn't the term I should have used. Those retval
variables seemed to just add more to the code then appears to be
necessary.  You are right though the compiler probably optimized them
right out of the code so I can't imagine a performance increase as a
result of this.

I quite like that idea of having the code fall out the bottom and I
guess I just never really thought about it that way.

Anyway thanks again,

Trevor Pace



On Fri, Jul 24, 2009 at 2:34 PM, Greg KH<gregkh@suse.de> wrote:
> On Fri, Jul 24, 2009 at 12:48:03PM -0300, Trevor Pace wrote:
>> Removed useless return value variables.
>
> Why are they "useless"?
>
> They seem useful to me, especially as it causes the code to fall out of
> the function at the bottom, and not in the middle, which makes
> maintaining the code easier to do over time, right?
>
> And did this actually cause any generated code to be
> faster/smaller/better?
>
> Oh, and you seem to have messed up a bit of whitespace, please always
> run your patches through scripts/checkpatch.pl first.
>
> thanks,
>
> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2009-07-24 21:25    [W:0.088 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site