Re: [Patch 1/2] usb/serial/mct_usb232: move DMA buffers to heap

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

 



On Sat, 5 Dec 2009, Pete Zaitcev wrote:

> My distro kernel (Fedora Rawhide) started throwing warnings from DMA API
> checker, so I have no choice but band-aid it quick. There's no attempt
> to reuse DMA buffers. Control messages are only sent rarely anyway.

> +	buf[0] = divisor;
> +	buf[1] = divisor >> 8;
> +	buf[2] = divisor >> 16;
> +	buf[3] = divisor >> 24;

For new code you really should use put_unaligned_le32().  It is 
optimized to perform better than this code on architectures that can do 
unaligned accesses in hardware.

Alan Stern

--
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