Re: [PATCH 07/10] staging: ozwpan: Use slab cache for oz_urb_link allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux