lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 5 Aug 2014 14:18:29 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Christoph Jaeger <email@...istophjaeger.info>
Cc:	shigekatsu.tateno@...el.com, gregkh@...uxfoundation.org,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/10] staging: ozwpan: Use slab cache for oz_urb_link
 allocation

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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists