mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
[PATCH] Transform kmem_cache_alloc()+memset(0) -> kmem_cache_zalloc().
Replace appropriate pairs of "kmem_cache_alloc()" + "memset(0)" with the corresponding "kmem_cache_zalloc()" call. Signed-off-by: Robert P. J. Day <[email protected]> Cc: "Luck, Tony" <[email protected]> Cc: Andi Kleen <[email protected]> Cc: Roland McGrath <[email protected]> Cc: James Bottomley <[email protected]> Cc: Greg KH <[email protected]> Acked-by: Joel Becker <[email protected]> Cc: Steven Whitehouse <[email protected]> Cc: Jan Kara <[email protected]> Cc: Michael Halcrow <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Stephen Smalley <[email protected]> Cc: James Morris <[email protected]> Cc: Chris Wright <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
1b135431ab
commit
c376222960
39 changed files with 48 additions and 103 deletions
|
|
@ -2163,9 +2163,8 @@ static void etrax_usb_add_to_bulk_sb_list(struct urb *urb, int epid)
|
|||
|
||||
maxlen = usb_maxpacket(urb->dev, urb->pipe, usb_pipeout(urb->pipe));
|
||||
|
||||
sb_desc = (USB_SB_Desc_t*)kmem_cache_alloc(usb_desc_cache, SLAB_FLAG);
|
||||
sb_desc = kmem_cache_zalloc(usb_desc_cache, SLAB_FLAG);
|
||||
assert(sb_desc != NULL);
|
||||
memset(sb_desc, 0, sizeof(USB_SB_Desc_t));
|
||||
|
||||
|
||||
if (usb_pipeout(urb->pipe)) {
|
||||
|
|
|
|||
|
|
@ -624,12 +624,10 @@ static inline struct urb_priv *uhci_alloc_urb_priv(struct uhci_hcd *uhci,
|
|||
{
|
||||
struct urb_priv *urbp;
|
||||
|
||||
urbp = kmem_cache_alloc(uhci_up_cachep, GFP_ATOMIC);
|
||||
urbp = kmem_cache_zalloc(uhci_up_cachep, GFP_ATOMIC);
|
||||
if (!urbp)
|
||||
return NULL;
|
||||
|
||||
memset((void *)urbp, 0, sizeof(*urbp));
|
||||
|
||||
urbp->urb = urb;
|
||||
urb->hcpriv = urbp;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue