All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Ohad Ben-Cohen <ohad@wizery.com>
Cc: linux-omap@vger.kernel.org, Kanigeri Hari <h-kanigeri2@ti.com>,
	Hiroshi Doyu <Hiroshi.DOYU@nokia.com>
Subject: Re: [PATCH v2 3/4] omap: mailbox: fix reverse likeliness
Date: Mon, 3 May 2010 11:02:24 -0700	[thread overview]
Message-ID: <20100503180224.GV29604@atomide.com> (raw)
In-Reply-To: <1272815071-2827-4-git-send-email-ohad@wizery.com>

* Ohad Ben-Cohen <ohad@wizery.com> [100502 08:40]:
> Fix reverse likeliness
> 
> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
> ---
> If you want, you can also reach me at < ohadb at ti dot com >.
> 
>  arch/arm/plat-omap/mailbox.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c
> index 5140efc..5309213 100644
> --- a/arch/arm/plat-omap/mailbox.c
> +++ b/arch/arm/plat-omap/mailbox.c
> @@ -290,7 +290,7 @@ static int omap_mbox_startup(struct omap_mbox *mbox)
>   fail_alloc_txq:
>  	free_irq(mbox->irq, mbox);
>   fail_request_irq:
> -	if (unlikely(mbox->ops->shutdown))
> +	if (likely(mbox->ops->shutdown))
>  		mbox->ops->shutdown(mbox);
>  
>  	return ret;
> @@ -303,7 +303,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
>  
>  	free_irq(mbox->irq, mbox);
>  
> -	if (unlikely(mbox->ops->shutdown)) {
> +	if (likely(mbox->ops->shutdown)) {
>  		spin_lock(&mboxes_lock);
>  		if (mbox_configured > 0)
>  			mbox_configured--;

Does this code path need to be optimized? :)

How about just get rid of the (un)likely here?

Regards,

Tony

  reply	other threads:[~2010-05-03 18:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-02 15:44 [PATCH v2 0/4] omap: mailbox: cleanup & simplify Ohad Ben-Cohen
2010-05-02 15:44 ` [PATCH v2 1/4] omap: mailbox: convert rwlocks to spinlock Ohad Ben-Cohen
2010-05-02 15:44 ` [PATCH v2 2/4] omap: mailbox cleanup: split MODULE_AUTHOR line Ohad Ben-Cohen
2010-05-02 15:44 ` [PATCH v2 3/4] omap: mailbox: fix reverse likeliness Ohad Ben-Cohen
2010-05-03 18:02   ` Tony Lindgren [this message]
2010-05-04 11:47     ` Ohad Ben-Cohen
2010-05-05 15:21       ` Tony Lindgren
2010-05-05 15:24         ` Ohad Ben-Cohen
2010-05-06  5:19         ` Hiroshi DOYU
2010-05-02 15:44 ` [PATCH v2 4/4] omap: mailbox: convert block api to kfifo Ohad Ben-Cohen
2010-05-03  5:30   ` Hiroshi DOYU
2010-05-03  6:07     ` Hiroshi DOYU
2010-05-03  9:41       ` Ohad Ben-Cohen
2010-05-03 10:27         ` [PATCH " Ohad Ben-Cohen
2010-05-03  6:35     ` [PATCH v2 " Ohad Ben-Cohen

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=20100503180224.GV29604@atomide.com \
    --to=tony@atomide.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=h-kanigeri2@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.com \
    /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.