mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trevor Pace <trevorpace@gmail.com>
To: Greg KH <gregkh@suse.de>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org
Subject: Fwd: [PATCH] Removed useless retval variables in usb-serial.c
Date: Fri, 24 Jul 2009 16:22:10 -0300	[thread overview]
Message-ID: <bad58e960907241222j5d7ad970tce4860aa7c273c44@mail.gmail.com> (raw)
In-Reply-To: <bad58e960907241047o7558a715u6a36535f2496c49d@mail.gmail.com>

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/
>

      parent reply	other threads:[~2009-07-24 19:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 15:48 Trevor Pace
2009-07-24 16:29 ` Sergei Shtylyov
2009-07-24 17:06   ` Trevor Pace
2009-07-24 18:29     ` Greg KH
2009-07-24 16:53 ` Oliver Neukum
2009-07-24 19:16   ` Greg KH
2009-07-24 17:34 ` Greg KH
2009-07-24 18:02   ` Joe Perches
2009-07-24 18:12     ` Greg KH
     [not found]   ` <bad58e960907241047o7558a715u6a36535f2496c49d@mail.gmail.com>
2009-07-24 19:22     ` Trevor Pace [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bad58e960907241222j5d7ad970tce4860aa7c273c44@mail.gmail.com \
    --to=trevorpace@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®