Re: [PATCH] xHCI: refine td allocation

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

 



Hello.

On 26.07.2011 16:03, Oliver Neukum wrote:

@@ -1059,13 +1060,15 @@ int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
   	if (!urb_priv)
   		return -ENOMEM;

+	buffer = kzalloc(size * sizeof(struct xhci_td), mem_flags);

     kcalloc() fits somewhat better here.

Is this really safe on all architectures? kmalloc() guarantees that you can
manipulate a TD without affecting other TDs

Hm, well, kcalloc() is impelemeted the same way as kmalloc(), via call to __kmalloc().

	Regards
		Oliver

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux