public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christoph Jaeger <email@christophjaeger.info>
Cc: shigekatsu.tateno@atmel.com, gregkh@linuxfoundation.org,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 07/10] staging: ozwpan: Use slab cache for oz_urb_link allocation
Date: Tue, 5 Aug 2014 14:18:29 +0300	[thread overview]
Message-ID: <20140805111829.GU4856@mwanda> (raw)
In-Reply-To: <1407156896-3246-8-git-send-email-email@christophjaeger.info>

On Mon, Aug 04, 2014 at 02:54:53PM +0200, Christoph Jaeger wrote:
> @@ -2341,6 +2289,11 @@ int oz_hcd_init(void)
>  
>  	if (usb_disabled())
>  		return -ENODEV;
> +
> +	oz_urb_link_cache = KMEM_CACHE(oz_urb_link, 0);
> +	if (unlikely(!oz_urb_link_cache))
> +		return -ENOMEM;

Don't put unlikely() calls in driver code.  It just makes it messy for
no reason.  "Oooo!  I can modprobe/rmmod this driver 1000000 times in a
row and it speeds it up .0003 seconds because I added an unlikely tag!"

regards,
dan carpenter


  reply	other threads:[~2014-08-05 11:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 12:54 [PATCH 00/10] staging: Clean up ozwpan driver Christoph Jaeger
2014-08-04 12:54 ` [PATCH 01/10] staging: ozwpan: Add module parameter description Christoph Jaeger
2014-08-04 12:54 ` [PATCH 02/10] staging: ozwpan: Fix typo in typedef Christoph Jaeger
2014-08-10  4:42   ` Greg KH
2014-08-04 12:54 ` [PATCH 03/10] staging: ozwpan: Remove unused OZ_MAX_TIMER_POOL_SIZE Christoph Jaeger
2014-08-04 12:54 ` [PATCH 04/10] staging: ozwpan: Remove redundant initialization Christoph Jaeger
2014-08-04 12:54 ` [PATCH 05/10] staging: ozwpan: Remove dead code Christoph Jaeger
2014-08-04 12:54 ` [PATCH 06/10] staging: ozwpan: Simplify app interface Christoph Jaeger
2014-08-05 11:13   ` Dan Carpenter
2014-08-04 12:54 ` [PATCH 07/10] staging: ozwpan: Use slab cache for oz_urb_link allocation Christoph Jaeger
2014-08-05 11:18   ` Dan Carpenter [this message]
2014-08-08  5:59   ` [PATCH 07/10 v2] " Christoph Jaeger
2014-08-04 12:54 ` [PATCH 08/10] staging: ozwpan: Use slab cache for oz_elt_info allocation Christoph Jaeger
2014-08-08  6:00   ` [PATCH 08/10 v2] " Christoph Jaeger
2014-08-04 12:54 ` [PATCH 09/10] staging: ozwpan: Use slab cache for oz_tx_frame allocation Christoph Jaeger
2014-08-08  6:01   ` [PATCH 09/10 v2] " Christoph Jaeger
2014-08-04 12:54 ` [PATCH 10/10] staging: ozwpan: Use list helpers Christoph Jaeger

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=20140805111829.GU4856@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=email@christophjaeger.info \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shigekatsu.tateno@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox