All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] staging: wlags49_h2: Replace kmalloc+memset by kzalloc and add error handling.
Date: Fri, 23 Mar 2012 15:41:07 +0000	[thread overview]
Message-ID: <20120323154107.GA15516@kroah.com> (raw)
In-Reply-To: <20120323095158.GB3181@mwanda>

On Fri, Mar 23, 2012 at 09:00:19PM +0530, santosh prasad nayak wrote:
> Can you please explain whats the disadvantage of having 'unlikely()' here ?
> I have seen it at several places in driver side.

And I bet they are used wrong there.  Again, unless you are in some very
performance critical section of code, don't use unlikely().

The big thing is that it just is not needed at all.  Don't try to be
smarter than the compiler if you don't need it, _AND_ you haven't
actually measured it.

greg k-h

  parent reply	other threads:[~2012-03-23 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23  9:51 [PATCH] staging: wlags49_h2: Replace kmalloc+memset by kzalloc and add error handling Dan Carpenter
2012-03-23  9:53 ` santosh nayak
2012-03-23  9:58 ` santosh prasad nayak
2012-03-23 10:40 ` Dan Carpenter
2012-03-23 14:56 ` Greg KH
2012-03-23 15:41 ` Greg KH [this message]
2012-03-23 15:42 ` santosh prasad nayak
2012-03-27 20:53 ` Ezequiel García

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=20120323154107.GA15516@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.